doc / ch.tutteli.atrium.api.fluent.en_GB / toBeTheSamePointInTimeAs

toBeTheSamePointInTimeAs

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

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

expect(LocalDate.of(2021, Month.JUNE, 6)).toBeTheSamePointInTimeAs(LocalDate.of(2021, Month.JUNE, 6))

Return
an Expect for the subject of this expectation.

Since
0.17.0

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

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

expect(LocalDate.of(2021, Month.JUNE, 6)).toBeTheSamePointInTimeAs("2021-06-06")

Exceptions

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>.toBeTheSamePointInTimeAs(expected: ChronoLocalDateTime<*>): Expect<T> (source)

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

expect(LocalDateTime.of(2021, Month.JUNE, 6, 10, 5, 35, 103)).toBeTheSamePointInTimeAs(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>.toBeTheSamePointInTimeAs(expected: ChronoZonedDateTime<*>): Expect<T> (source)

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

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