All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonTest.com.copperleaf.json.utils.TestEither.kt Maven / Gradle / Ivy

There is a newer version: 0.7.0
Show newest version
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