kotest-assertions / io.kotest.properties / period

period

fun Gen.Companion.period(maxYear: Int = 10): Gen<Period>
Deprecated: Deprecated and will be removed in 5.0. Migrate to the new property test classes in 4.0

Generates a stream of random Periods

This generator creates randomly generated Periods, with years less than or equal to maxYear.

If maxYear is 0, only random months and days will be generated.

Months will always be in range 0..11 Days will always be in range 0..31