FloatSource
Annotation to indicate that the annotated float parameter should be populated with a random value from the provided values array.
Samples
/**
* This will generate 4 tests with the values 1 - 3, 5
*/
@GeneratedParametersTest
fun testFloatSource(@FloatSource(values = [1.0f, 2.0f, 3.0f, 5.0f]) value: Int) {
assertThat(value).isIn(1.0f, 2.0f, 3.0f, 5.0f)
}Content copied to clipboard