Skip to content
Snippets Groups Projects
Commit a51bf527 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added simple test for merge conflicts

parent d08baac8
Branches
Tags
No related merge requests found
...@@ -205,7 +205,17 @@ class ConfigUtilsTest extends TestNGSuite with Matchers { ...@@ -205,7 +205,17 @@ class ConfigUtilsTest extends TestNGSuite with Matchers {
//TODO: test BiopetQScript error message //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 { object ConfigUtilsTest {
def writeTemp(text: String, extension: String): File = { def writeTemp(text: String, extension: String): File = {
val file = File.createTempFile("TestConfigUtils.", extension) val file = File.createTempFile("TestConfigUtils.", extension)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment