Remove GetTest.GetError

This commit is contained in:
Michael Bull 2017-10-21 18:12:25 +01:00
parent be2fa210cc
commit 99515df0f7
1 changed files with 2 additions and 4 deletions

View File

@ -5,8 +5,6 @@ import com.natpryce.hamkrest.equalTo
import org.junit.jupiter.api.Test
internal class GetTest {
private object GetError
@Test
internal fun `get should return the result value if ok`() {
val value = ok(12).get()
@ -15,7 +13,7 @@ internal class GetTest {
@Test
internal fun `get should return null if not ok`() {
val value = err(GetError).get()
val value = err("error").get()
assertThat(value, equalTo(null))
}
@ -39,7 +37,7 @@ internal class GetTest {
@Test
internal fun `getOr should return default value if not ok`() {
val value = err(GetError).getOr("default")
val value = err("error").getOr("default")
assertThat(value, equalTo("default"))
}