LongSource

@SourceProvider(value = LongValueSourceDataProvider::class)
annotation class LongSource(val values: LongArray)

Annotation to indicate that the annotated long 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 testLongSource(@LongSource(values = [1L, 2L, 3L, 5L]) value: Int) {
    assertThat(value).isIn(1L, 2L, 3L, 5L)
}

Properties

Link copied to clipboard