import io.kotest.matchers.collections.shouldContain
import org.junit.jupiter.api.Test
class Test3 {
@Test
fun `it should pass`() {
val list = listOf("1", "2", "3", "4", "5")
list shouldContain "3"
}
}
Kotest is full of collection matchers - make use of them to make assertions on collections and collection elements
Enjoy KotlinTesting.com quick tips?
Share it to fellow developers on social media!