From 7bc76abbd5b5ce91e6b5f0a7721af1da2a3e4704 Mon Sep 17 00:00:00 2001
From: Peter van 't Hof <p.j.van_t_hof@lumc.nl>
Date: Thu, 23 Jul 2015 10:40:54 +0200
Subject: [PATCH] Added nested unit test for merge conflicts

---
 .../nl/lumc/sasc/biopet/utils/ConfigUtilsTest.scala      | 9 +++++++++
 1 file changed, 9 insertions(+)

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 ace12785c..4dbb1daec 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
@@ -214,6 +214,15 @@ class ConfigUtilsTest extends TestNGSuite with Matchers {
     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")
   }
+
+  @Test def testNestedMergeConflict: Unit = {
+    val map1 = Map("c" -> Map("x" -> "1"))
+    val map2 = Map("c" -> Map("x" -> "1"))
+    mergeMaps(map1, map2) shouldBe Map("c" -> Map("x" -> "1"))
+    mergeMaps(map1, map2, (a, b, k) => a.toString + b.toString) shouldBe Map("c" -> Map("x" -> "12"))
+    mergeMaps(map2, map1, (a, b, k) => a.toString + b.toString) shouldBe Map("c" -> Map("x" -> "21"))
+    mergeMaps(map2, map2, (a, b, k) => a.toString + b.toString) shouldBe Map("c" -> Map("x" -> "22"))
+  }
 }
 
 object ConfigUtilsTest {
-- 
GitLab