KotlinTest
Basic Setup
Solution
fun add(a: Int, b: Int) = a + bfun add(a: Int, b: Int) = a + bTests
import io.kotlintest.matchers.shouldBe
import io.kotlintest.specs.StringSpec
class TestAdd : StringSpec() {
init {
"add(1, 1) should return 2" {
add(1, 1) shouldBe 2
}
}
}import io.kotlintest.matchers.shouldBe
import io.kotlintest.specs.StringSpec
class TestAdd : StringSpec() {
init {
"add(1, 1) should return 2" {
add(1, 1) shouldBe 2
}
}
}