fun <T : ChronoLocalDate> Expect<T>.toBeBeforeOrTheSamePointInTimeAs(expected: ChronoLocalDate): Expect<T>
(source)
Expects that the subject of this
expectation (a ChronoLocalDate)
is before or equal the expected.
expect(LocalDate.of(2021, Month.JUNE, 6)).toBeBeforeOrTheSamePointInTimeAs(LocalDate.of(2021, Month.JULY, 1))
expect(LocalDate.of(2021, Month.JUNE, 6)).toBeBeforeOrTheSamePointInTimeAs(LocalDate.of(2021, Month.JUNE, 6))
Return
an Expect for the subject of this
expectation.
Since
0.17.0
fun <T : ChronoLocalDate> Expect<T>.toBeBeforeOrTheSamePointInTimeAs(expected: String): Expect<T>
(source)
Expects that the subject of this
expectation (a ChronoLocalDate)
is before or equal the expected given as String.
expect(LocalDate.of(2021, Month.JUNE, 6)).toBeBeforeOrTheSamePointInTimeAs("2021-07-01")
expect(LocalDate.of(2021, Month.JUNE, 6)).toBeBeforeOrTheSamePointInTimeAs("2021-06-06")
java.time.DateTimeException
- in case expected is not in the form of yyyy-mm-dd
Return
an Expect for the subject of this
expectation.
Since
0.17.0
fun <T : ChronoLocalDateTime<out ChronoLocalDate>> Expect<T>.toBeBeforeOrTheSamePointInTimeAs(expected: ChronoLocalDateTime<*>): Expect<T>
(source)
Expects that the subject of this
expectation (a ChronoLocalDateTime)
is before or equal the expected.
expect(LocalDateTime.of(2021, Month.JUNE, 6, 10, 5, 35, 103)).toBeBeforeOrTheSamePointInTimeAs(LocalDateTime.of(2021, Month.JUNE, 6, 12, 10, 0, 0))
expect(LocalDateTime.of(2021, Month.JUNE, 6, 10, 5, 35, 103)).toBeBeforeOrTheSamePointInTimeAs(LocalDateTime.of(2021, Month.JUNE, 6, 10, 5, 35, 103))
Return
an Expect for the subject of this
expectation.
Since
0.17.0
fun <T : ChronoZonedDateTime<out ChronoLocalDate>> Expect<T>.toBeBeforeOrTheSamePointInTimeAs(expected: ChronoZonedDateTime<*>): Expect<T>
(source)
Expects that the subject of this
expectation (a ChronoZonedDateTime)
is before or equals the expected.
expect(ZonedDateTime.of(2021, 6, 6, 10, 5, 35, 103, ZoneId.of("America/Sao_Paulo")))
.toBeBeforeOrTheSamePointInTimeAs(ZonedDateTime.of(2021, 6, 6, 12, 10, 0, 0, ZoneId.of("America/Sao_Paulo")))
expect(ZonedDateTime.of(2021, 6, 6, 10, 5, 35, 103, ZoneId.of("America/Sao_Paulo")))
.toBeBeforeOrTheSamePointInTimeAs(ZonedDateTime.of(2021, 6, 6, 10, 5, 35, 103, ZoneId.of("America/Sao_Paulo")))
Return
an Expect for the subject of this
expectation.
Since
0.17.0