commonTest.com.copperleaf.json.utils.TestEither.kt Maven / Gradle / Ivy
package com.copperleaf.json.utils
import io.kotest.core.spec.style.FreeSpec
import io.kotest.matchers.shouldBe
class TestEither : FreeSpec({
"left" {
val value: Either = "one".asLeft()
value.leftValue shouldBe "one"
}
"implied left" {
val value: Either = "one".asEither()
value.leftValue shouldBe "one"
}
"right" {
val value: Either = 3.asRight()
value.rightValue shouldBe 3
}
"implied right" {
val value: Either = 3.asEither()
value.rightValue shouldBe 3
}
})
© 2015 - 2024 Weber Informatics LLC | Privacy Policy