How to use data driven in Kotest with style AnnotationSpec()
Example for JUnit 5:
@ParameterizedTest
@ValueSource(ints = {1, 3, 5, -3, 15, Integer.MAX_VALUE}) // six numbers
void isOdd_ShouldReturnTrueForOddNumbers(int number) {
assertTrue(Numbers.isOdd(number));
}
How can I do this in Kotest? This is what I tried to come up with:
class AnnotationSpecExample : AnnotationSpec() {
@Test
fun test1(value: Int) {
value shouldBe 1
}
}
I couldn't find documentation and examples.