From 31d6ba36ba3af78424889fc6e26032cd906d7c1d Mon Sep 17 00:00:00 2001 From: Sander Bollen <a.h.b.bollen@lumc.nl> Date: Thu, 9 Apr 2015 17:50:00 +0200 Subject: [PATCH] adding VcfFilterTest stub --- .../sasc/biopet/tools/VcfFilterTest.scala | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/tools/VcfFilterTest.scala diff --git a/public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/tools/VcfFilterTest.scala b/public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/tools/VcfFilterTest.scala new file mode 100644 index 000000000..f4d2c7ae2 --- /dev/null +++ b/public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/tools/VcfFilterTest.scala @@ -0,0 +1,43 @@ +package nl.lumc.sasc.biopet.tools + +import java.nio.file.Paths + +import org.testng.annotations.Test +import org.scalatest.Matchers +import org.scalatest.mock.MockitoSugar +import org.scalatest.testng.TestNGSuite + +import scala.util.Random + +/** + * Created by ahbbollen on 9-4-15. + */ +class VcfFilterTest extends TestNGSuite with MockitoSugar with Matchers { + + import VcfFilter._ + private def resourcePath(p: String): String = { + Paths.get(getClass.getResource(p).toURI).toString + } + + val vepped_path = resourcePath("/VEP_oneline.vcf") + val rand = new Random() + + @Test def testOutputTypeVcf() = { + val tmp_path = "/tmp/VcfFilter_" + rand.nextString(10) + ".vcf" + val arguments: Array[String] = Array("-I", vepped_path, "-o", tmp_path) + main(arguments) + } + + @Test def testOutputTypeBcf() = { + val tmp_path = "/tmp/VcfFilter_" + rand.nextString(10) + ".bcf" + val arguments: Array[String] = Array("-I", vepped_path, "-o", tmp_path) + main(arguments) + } + + @Test def testOutputTypeVcfGz() = { + val tmp_path = "/tmp/VcfFilter_" + rand.nextString(10) + ".vcf.gz" + val arguments: Array[String] = Array("-I", vepped_path, "-o", tmp_path) + main(arguments) + } + +} -- GitLab