Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
7bc76abb
Commit
7bc76abb
authored
Jul 23, 2015
by
Peter van 't Hof
Browse files
Added nested unit test for merge conflicts
parent
a51bf527
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/utils/ConfigUtilsTest.scala
View file @
7bc76abb
...
...
@@ -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
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment