From 08bcca4d5fcf1ac279206d4064d4c238126b83ec Mon Sep 17 00:00:00 2001
From: Peter van 't Hof <p.j.van_t_hof@lumc.nl>
Date: Thu, 15 Oct 2015 20:02:41 +0200
Subject: [PATCH] Each aligner has his own class now

---
 ...ngTest.scala => AbstractTestMapping.scala} | 40 ++++++++++++++++++-
 1 file changed, 38 insertions(+), 2 deletions(-)
 rename public/mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/{MappingTest.scala => AbstractTestMapping.scala} (85%)

diff --git a/public/mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingTest.scala b/public/mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/AbstractTestMapping.scala
similarity index 85%
rename from public/mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingTest.scala
rename to public/mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/AbstractTestMapping.scala
index 9b6c87a20..fefa712b2 100644
--- a/public/mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/MappingTest.scala
+++ b/public/mapping/src/test/scala/nl/lumc/sasc/biopet/pipelines/mapping/AbstractTestMapping.scala
@@ -36,7 +36,7 @@ import org.testng.annotations.{ AfterClass, DataProvider, Test }
  *
  * Created by pjvan_thof on 2/12/15.
  */
-class MappingTest extends TestNGSuite with Matchers {
+abstract class AbstractTestMapping extends TestNGSuite with Matchers {
   def initPipeline(map: Map[String, Any]): Mapping = {
     new Mapping {
       override def configName = "mapping"
@@ -46,6 +46,8 @@ class MappingTest extends TestNGSuite with Matchers {
     }
   }
 
+  val aligner: String
+
   @DataProvider(name = "mappingOptions")
   def mappingOptions = {
     val aligners = Array("bwa-mem", "bwa-aln", "star", "star-2pass", "bowtie", "stampy", "gsnap", "tophat")
@@ -56,7 +58,6 @@ class MappingTest extends TestNGSuite with Matchers {
     val zipped = Array(true, false)
 
     for (
-      aligner <- aligners;
       pair <- paired;
       chunk <- chunks;
       skipMarkDuplicate <- skipMarkDuplicates;
@@ -99,7 +100,42 @@ class MappingTest extends TestNGSuite with Matchers {
   }
 }
 
+class MappingBwaMemTest extends AbstractTestMapping {
+  val aligner = "bwa-mem"
+}
+
+class MappingBwaAlnTest extends AbstractTestMapping {
+  val aligner = "bwa-aln"
+}
+
+class MappingStarTest extends AbstractTestMapping {
+  val aligner = "star"
+}
+
+class MappingStar2PassTest extends AbstractTestMapping {
+  val aligner = "star-2pass"
+}
+
+class MappingBowtieTest extends AbstractTestMapping {
+  val aligner = "bowtie"
+}
+
+class MappingStampyTest extends AbstractTestMapping {
+  val aligner = "stampy"
+}
+
+class MappingGsnapTest extends AbstractTestMapping {
+  val aligner = "gsnap"
+}
+
+class MappingTophatTest extends AbstractTestMapping {
+  val aligner = "tophat"
+}
+
 object MappingTest {
+
+  val aligners = Array("bwa-mem", "bwa-aln", "star", "star-2pass", "bowtie", "stampy", "gsnap", "tophat")
+
   val outputDir = Files.createTempDir()
   new File(outputDir, "input").mkdirs()
 
-- 
GitLab