Generadores de Kotlinx DateTime
Esta página fue traducida por PageTurner AI (beta). No está respaldada oficialmente por el proyecto. ¿Encontraste un error? Reportar problema →
Kotest ofrece un módulo opcional que proporciona generadores para KotlinX DateTime.
nota
Para utilizarlo, añade io.kotest.extensions:kotest-property-datetime:version a tu build.
| Generator | Description | JVM | JS | Native |
|---|---|---|---|---|
Arb.date(yearRange) | Generates LocalDates with the year between the given range and other fields randomly. | ✓ | ✓ | ✓ |
Arb.datesBetween(startDate, endDate) | Generates LocalDates in the given range. | ✓ | ✓ | ✓ |
Arb.datetime(yearRange, hourRange, minuteRange, secondRange) | Generates LocalDateTimes with all fields in the given ranges | ✓ | ✓ | ✓ |
Arb.instant(range) | Generates Instants with the epoch randomly generated in the given range | ✓ | ✓ | ✓ |