doc / ch.tutteli.atrium.api.infix.en_GB / toBeAfterOrTheSamePointInTimeAs

toBeAfterOrTheSamePointInTimeAs

infix fun <T : ChronoLocalDate> Expect<T>.toBeAfterOrTheSamePointInTimeAs(expected: ChronoLocalDate): Expect<T> (source)

Expects that the subject of this expectation (a ChronoLocalDate) is after or equal the expected.

expect(LocalDate.of(2021, Month.AUGUST, 6)) toBeAfterOrTheSamePointInTimeAs LocalDate.of(2021, Month.JULY, 1)
expect(LocalDate.of(2021, Month.JULY, 1)) toBeAfterOrTheSamePointInTimeAs LocalDate.of(2021, Month.JULY, 1)

Return
an Expect for the subject of this expectation.

Since
0.17.0

infix fun <T : ChronoLocalDate> Expect<T>.toBeAfterOrTheSamePointInTimeAs(expected: String): Expect<T> (source)

Expects that the subject of this expectation (a ChronoLocalDate) is after or equal the expected given as String.

expect(LocalDate.of(2021, Month.AUGUST, 6)) toBeAfterOrTheSamePointInTimeAs "2021-07-01"
expect(LocalDate.of(2021, Month.JULY, 1)) toBeAfterOrTheSamePointInTimeAs "2021-07-01"

Exceptions

IllegalArgumentException - 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

infix fun <T : ChronoLocalDateTime<out ChronoLocalDate>> Expect<T>.toBeAfterOrTheSamePointInTimeAs(expected: ChronoLocalDateTime<*>): Expect<T> (source)

Expects that the subject of this expectation (a ChronoLocalDateTime) is after or equal the expected.

expect(LocalDateTime.of(2021, Month.JUNE, 6, 12, 10, 0, 0)) toBeAfterOrTheSamePointInTimeAs LocalDateTime.of(2021, Month.JUNE, 6, 10, 5, 35, 103)
expect(LocalDateTime.of(2021, Month.JUNE, 6, 10, 5, 35, 103)) toBeAfterOrTheSamePointInTimeAs LocalDateTime.of(2021, Month.JUNE, 6, 10, 5, 35, 103)

Return
an Expect for the subject of this expectation.

Since
0.17.0

infix fun <T : ChronoZonedDateTime<out ChronoLocalDate>> Expect<T>.toBeAfterOrTheSamePointInTimeAs(expected: ChronoZonedDateTime<*>): Expect<T> (source)

Expects that the subject of this expectation (a ChronoZonedDateTime) is after or equal the expected.

expect(ZonedDateTime.of(2021, 6, 6, 12, 10, 0, 0, ZoneId.of("America/Sao_Paulo"))) toBeAfterOrTheSamePointInTimeAs ZonedDateTime.of(2021, 6, 6, 10, 5, 35, 103, ZoneId.of("America/Sao_Paulo"))
expect(ZonedDateTime.of(2021, 6, 6, 10, 5, 35, 103, ZoneId.of("America/Sao_Paulo"))) toBeAfterOrTheSamePointInTimeAs 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