Commit b0f1be5a authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fixed style

parent 76b770a7
package nl.lumc.sasc.biopet.tools package nl.lumc.sasc.biopet.tools
import java.io.{ OutputStream, PrintStream, ByteArrayOutputStream }
import java.nio.file.Paths import java.nio.file.Paths
import htsjdk.samtools.fastq.FastqRecord import htsjdk.samtools.fastq.FastqRecord
import nl.lumc.sasc.biopet.utils.Logging
import org.apache.log4j.{ FileAppender, Appender }
import org.scalatest.Matchers import org.scalatest.Matchers
import org.scalatest.testng.TestNGSuite import org.scalatest.testng.TestNGSuite
import org.testng.annotations.{ DataProvider, Test } import org.testng.annotations.{ DataProvider, Test }
import scala.collection.JavaConversions._
/** /**
* This class test ValidateFatq
*
* Created by pjvan_thof on 2/17/16. * Created by pjvan_thof on 2/17/16.
*/ */
class ValidateFastqTest extends TestNGSuite with Matchers { class ValidateFastqTest extends TestNGSuite with Matchers {
@Test @Test
def testCheckMate: Unit = { def testCheckMate(): Unit = {
ValidateFastq.checkMate(new FastqRecord("read_1", "ATCG", "", "AAAA"), new FastqRecord("read_1", "ATCG", "", "AAAA")) ValidateFastq.checkMate(new FastqRecord("read_1", "ATCG", "", "AAAA"), new FastqRecord("read_1", "ATCG", "", "AAAA"))
intercept[IllegalStateException] { intercept[IllegalStateException] {
...@@ -27,7 +24,7 @@ class ValidateFastqTest extends TestNGSuite with Matchers { ...@@ -27,7 +24,7 @@ class ValidateFastqTest extends TestNGSuite with Matchers {
} }
@Test @Test
def testDuplicateCheck: Unit = { def testDuplicateCheck(): Unit = {
ValidateFastq.duplicateCheck(new FastqRecord("read_1", "ATCG", "", "AAAA"), None) ValidateFastq.duplicateCheck(new FastqRecord("read_1", "ATCG", "", "AAAA"), None)
ValidateFastq.duplicateCheck(new FastqRecord("read_1", "ATCG", "", "AAAA"), Some(new FastqRecord("read_2", "ATCG", "", "AAAA"))) ValidateFastq.duplicateCheck(new FastqRecord("read_1", "ATCG", "", "AAAA"), Some(new FastqRecord("read_2", "ATCG", "", "AAAA")))
...@@ -58,14 +55,14 @@ class ValidateFastqTest extends TestNGSuite with Matchers { ...@@ -58,14 +55,14 @@ class ValidateFastqTest extends TestNGSuite with Matchers {
} }
@Test @Test
def testGetPossibleEncodingsFail: Unit = { def testGetPossibleEncodingsFail(): Unit = {
ValidateFastq.minQual = Some('!') ValidateFastq.minQual = Some('!')
ValidateFastq.maxQual = Some('h') ValidateFastq.maxQual = Some('h')
ValidateFastq.getPossibleEncodings shouldBe Nil ValidateFastq.getPossibleEncodings shouldBe Nil
} }
@Test @Test
def testCheckQualEncoding: Unit = { def testCheckQualEncoding(): Unit = {
ValidateFastq.minQual = None ValidateFastq.minQual = None
ValidateFastq.maxQual = None ValidateFastq.maxQual = None
ValidateFastq.checkQualEncoding(new FastqRecord("read_1", "ATCG", "", "AAAA")) ValidateFastq.checkQualEncoding(new FastqRecord("read_1", "ATCG", "", "AAAA"))
...@@ -92,7 +89,7 @@ class ValidateFastqTest extends TestNGSuite with Matchers { ...@@ -92,7 +89,7 @@ class ValidateFastqTest extends TestNGSuite with Matchers {
} }
@Test @Test
def testValidFastqRecord: Unit = { def testValidFastqRecord(): Unit = {
ValidateFastq.minQual = None ValidateFastq.minQual = None
ValidateFastq.maxQual = None ValidateFastq.maxQual = None
ValidateFastq.validFastqRecord(new FastqRecord("read_1", "ATCG", "", "AAAA")) ValidateFastq.validFastqRecord(new FastqRecord("read_1", "ATCG", "", "AAAA"))
...@@ -110,7 +107,7 @@ class ValidateFastqTest extends TestNGSuite with Matchers { ...@@ -110,7 +107,7 @@ class ValidateFastqTest extends TestNGSuite with Matchers {
Paths.get(getClass.getResource(p).toURI).toString Paths.get(getClass.getResource(p).toURI).toString
@Test @Test
def testMain: Unit = { def testMain(): Unit = {
ValidateFastq.minQual = None ValidateFastq.minQual = None
ValidateFastq.maxQual = None ValidateFastq.maxQual = None
val r1 = resourcePath("/paired01a.fq") val r1 = resourcePath("/paired01a.fq")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment