From 86eebea5109ad787282699bb55b3ba0f5230f8d4 Mon Sep 17 00:00:00 2001 From: Peter van 't Hof <p.j.van_t_hof@lumc.nl> Date: Tue, 10 Feb 2015 18:57:51 +0100 Subject: [PATCH] Remove tests --- .../lumc/sasc/biopet/utils/ConfigUtils.scala | 1 - .../sasc/biopet/utils/ConfigUtilsTest.scala | 61 +------------------ 2 files changed, 3 insertions(+), 59 deletions(-) diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala index 106ef2b6e..47e7d1af8 100644 --- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala +++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala @@ -331,7 +331,6 @@ object ConfigUtils extends Logging { trait ImplicitConversions { import scala.language.implicitConversions - //TODO: unit test on message private def requiredValue(value: ConfigValue): Boolean = { val exist = valueExists(value) if (!exist) diff --git a/public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/utils/ConfigUtilsTest.scala b/public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/utils/ConfigUtilsTest.scala index 26f989c53..ddcf887d8 100644 --- a/public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/utils/ConfigUtilsTest.scala +++ b/public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/utils/ConfigUtilsTest.scala @@ -4,6 +4,7 @@ import java.io.{ PrintWriter, File } import argonaut.Argonaut._ import argonaut.Json +import nl.lumc.sasc.biopet.core.BiopetQScript import nl.lumc.sasc.biopet.core.config.{ ConfigValueIndex, ConfigValue } import org.scalatest.Matchers import org.scalatest.mock.MockitoSugar @@ -170,79 +171,23 @@ class ConfigUtilsTest extends TestNGSuite with Matchers { val index = ConfigValueIndex("test", Nil, "test") new ImplicitConversions { configValue2list(ConfigValue(index, index, List(""))) shouldBe List("") - intercept[IllegalStateException] { - configValue2list(ConfigValue(index, index, null)) - } - configValue2stringList(ConfigValue(index, index, List(""))) shouldBe List("") - intercept[IllegalStateException] { - configValue2stringList(ConfigValue(index, index, null)) - } - configValue2stringSet(ConfigValue(index, index, List(""))) shouldBe Set("") - intercept[IllegalStateException] { - configValue2stringSet(ConfigValue(index, index, null)) - } var int: Int = ConfigValue(index, index, 1) - intercept[IllegalStateException] { - int = ConfigValue(index, index, null) - } - var long: Long = ConfigValue(index, index, 1) - intercept[IllegalStateException] { - long = ConfigValue(index, index, null) - } - var double: Double = ConfigValue(index, index, 1) - intercept[IllegalStateException] { - double = ConfigValue(index, index, null) - } - var float: Float = ConfigValue(index, index, 1) - intercept[IllegalStateException] { - float = ConfigValue(index, index, null) - } - var boolean: Boolean = ConfigValue(index, index, true) - intercept[IllegalStateException] { - boolean = ConfigValue(index, index, null) - } - var intOption: Option[Int] = ConfigValue(index, index, 1) - intercept[IllegalStateException] { - int = ConfigValue(index, index, null) - } - var longOption: Option[Long] = ConfigValue(index, index, 1) - intercept[IllegalStateException] { - long = ConfigValue(index, index, null) - } - var doubleOption: Option[Double] = ConfigValue(index, index, 1) - intercept[IllegalStateException] { - double = ConfigValue(index, index, null) - } - var floatOption: Option[Float] = ConfigValue(index, index, 1) - intercept[IllegalStateException] { - float = ConfigValue(index, index, null) - } - var booleanOption: Option[Boolean] = ConfigValue(index, index, true) - intercept[IllegalStateException] { - boolean = ConfigValue(index, index, null) - } - var string: String = ConfigValue(index, index, "test") - intercept[IllegalStateException] { - string = ConfigValue(index, index, null) - } - var file: File = ConfigValue(index, index, "test") - intercept[IllegalStateException] { - file = ConfigValue(index, index, null) - } + + //TODO: test BiopetQScript error message } } } -- GitLab