-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pool): #556 implement validation for golden record process
- Loading branch information
1 parent
700af9a
commit 6363bc5
Showing
12 changed files
with
601 additions
and
365 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
bpdm-common/src/test/kotlin/org/eclipse/tractusx/bpdm/common/util/CollectionUtilsKtTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.eclipse.tractusx.bpdm.common.util | ||
|
||
import org.assertj.core.api.Assertions | ||
import org.junit.jupiter.api.Test | ||
|
||
class CollectionUtilsKtTest { | ||
|
||
@Test | ||
fun mergeMapsWithCollectionInValue() { | ||
|
||
val key1 = "Task1" | ||
val key2 = "Task2" | ||
val key3 = "Task3" | ||
|
||
val firstMap = mapOf( | ||
key1 to listOf("value1", "value2"), | ||
key2 to listOf("value3", "value2", "value1") | ||
) | ||
val secondMap = mapOf( | ||
key1 to listOf("value4", "value5"), | ||
key3 to listOf("value4", "value1") | ||
) | ||
val thirdMap = mapOf( | ||
key1 to listOf("value6"), | ||
key3 to listOf("value7") | ||
) | ||
|
||
val result = mergeMapsWithCollectionInValue(firstMap, secondMap, thirdMap) | ||
Assertions.assertThat(result[key1]).containsExactlyInAnyOrder("value1", "value2", "value4", "value5", "value6") | ||
Assertions.assertThat(result[key2]).containsExactlyInAnyOrder("value3", "value2", "value1") | ||
Assertions.assertThat(result[key3]).containsExactlyInAnyOrder("value4", "value1", "value7") | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.