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 106ef2b6e3ee155f22ee8009e26e866455f796e6..47e7d1af8d21add7744613806ea7520d82cbf04d 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 26f989c5369c4e138ded82620d1d03f0c076ce7c..ddcf887d819eb0edc09bfc5b6a42954115e62192 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 } } }