Correct variable naming in OrTest
This commit is contained in:
parent
eb4aecaab8
commit
6f21fd634b
@ -15,8 +15,8 @@ internal class OrTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
internal fun `or should return the default value if not ok`() {
|
internal fun `or should return the default value if not ok`() {
|
||||||
val error = err(OrError).or(ok(5000)).get()
|
val value = err(OrError).or(ok(5000)).get()
|
||||||
assertThat(error, equalTo(5000))
|
assertThat(value, equalTo(5000))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -27,7 +27,7 @@ internal class OrTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
internal fun `orElse should return the transformed value if not ok`() {
|
internal fun `orElse should return the transformed value if not ok`() {
|
||||||
val error = err(4000).orElse { ok(2000) }.get()
|
val value = err(4000).orElse { ok(2000) }.get()
|
||||||
assertThat(error, equalTo(2000))
|
assertThat(value, equalTo(2000))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user