Improve merge unit tests
This commit is contained in:
parent
67c1cd33ad
commit
33d376c4c8
@ -111,16 +111,16 @@ class GetTest {
|
|||||||
@Test
|
@Test
|
||||||
fun returnsValueIfOk() {
|
fun returnsValueIfOk() {
|
||||||
assertEquals(
|
assertEquals(
|
||||||
expected = listOf(1, 2, 3),
|
expected = setOf(4, 5, 6),
|
||||||
actual = Ok(listOf(1, 2, 3)).merge()
|
actual = Ok(listOf(1, 2, 3)).and(Ok(setOf(4, 5, 6))).merge()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun returnsErrorIfErr() {
|
fun returnsErrorIfErr() {
|
||||||
assertEquals(
|
assertEquals(
|
||||||
expected = setOf(4, 5, 6),
|
expected = listOf(1, 2, 3),
|
||||||
actual = Err(setOf(4, 5, 6)).merge()
|
actual = Err(listOf(1, 2, 3)).and(Err(setOf(4, 5, 6))).merge()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user