Skip to content
Snippets Groups Projects
Commit bdd80767 authored by Sander Bollen's avatar Sander Bollen
Browse files

FastqSplitterTest

parent 2e511982
No related branches found
No related tags found
No related merge requests found
package nl.lumc.sasc.biopet.tools
import java.io.File
import java.nio.file.Paths
import org.scalatest.Matchers
import org.scalatest.mock.MockitoSugar
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.Test
/**
* Created by ahbbollen on 27-8-15.
*/
class FastqSplitterTest extends TestNGSuite with MockitoSugar with Matchers {
import FastqSplitter._
private def resourcePath(p: String): String = {
Paths.get(getClass.getResource(p).toURI).toString
}
val fq = resourcePath("/paired01a.fq")
@Test
def testMain() = {
val temp = File.createTempFile("out", ".fastq")
val args = Array("-I", fq, "-o", temp.getAbsolutePath)
main(args)
}
@Test
def testManyOutMain() = {
val files = (0 until 10).map(_ => File.createTempFile("out", ".fastq"))
var args = Array("-I", fq)
files.foreach(x => args ++= Array("-o", x.getAbsolutePath))
main(args)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment