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 2b8daab8b75dcb113c7e035952b0c42d395116a0..ace12785cea4858f5e9b3e57e12174fbf9d502bf 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 @@ -205,7 +205,17 @@ class ConfigUtilsTest extends TestNGSuite with Matchers { //TODO: test BiopetQScript error message } } + + @Test def testMergeConflict: Unit = { + val map1 = Map("c" -> "1") + val map2 = Map("c" -> "2") + mergeMaps(map1, map2) shouldBe Map("c" -> "1") + mergeMaps(map1, map2, (a, b, k) => a.toString + b.toString) shouldBe Map("c" -> "12") + mergeMaps(map2, map1, (a, b, k) => a.toString + b.toString) shouldBe Map("c" -> "21") + mergeMaps(map2, map2, (a, b, k) => a.toString + b.toString) shouldBe Map("c" -> "22") + } } + object ConfigUtilsTest { def writeTemp(text: String, extension: String): File = { val file = File.createTempFile("TestConfigUtils.", extension)