Given a dynamic test like the below I can't see how it's possible to use an annotation and have a unique key for each iteration:
class UnitTest {
@Nested
inner class Something {
@TestFactory
fun `something() successfully`(): List<DynamicTest> {
fun test(
something: String,
): DynamicTest {
return DynamicTest.dynamicTest(
"something: $something",
) {
// Test implementation
}
}
return listOf(
test(
"one"
),
test(
"two"
),
)
}
}
}
Is there any workaround or solution, perhaps a way to set the key in the test body?
Thanks
Given a dynamic test like the below I can't see how it's possible to use an annotation and have a unique key for each iteration:
Is there any workaround or solution, perhaps a way to set the key in the test body?
Thanks