Improve merge unit tests

This commit is contained in:
Michael Bull 2020-08-26 22:30:59 +01:00
parent 67c1cd33ad
commit 33d376c4c8

View File

@ -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()
) )
} }
} }