kotest-assertions-core / io.kotest.matchers.date / java.time.ZonedDateTime

Extensions for java.time.ZonedDateTime

atSameZone

Matcher that uses actual timezone on the expected ZonedDateTime

fun ZonedDateTime.atSameZone(): Matcher<ZonedDateTime>

shouldBeAfter

Asserts that this is after date

infix fun ZonedDateTime.shouldBeAfter(date: ZonedDateTime): Unit

shouldBeBefore

Asserts that this is before date

infix fun ZonedDateTime.shouldBeBefore(date: ZonedDateTime): Unit

shouldBeBetween

Asserts that this is between a and b

fun ZonedDateTime.shouldBeBetween(a: ZonedDateTime, b: ZonedDateTime): Unit

shouldBeToday

Asserts that the ZonedDateTime has a date component of today

fun ZonedDateTime.shouldBeToday(): Unit

shouldBeWithin

Asserts that this is within temporalAmount of date

fun ZonedDateTime.shouldBeWithin(temporalAmount: TemporalAmount, date: ZonedDateTime): Unit

shouldHaveSameDayAs

Asserts that this day is the same as date's day

infix fun ZonedDateTime.shouldHaveSameDayAs(date: ZonedDateTime): Unit

shouldHaveSameMonthAs

Asserts that this month is the same as date's month

infix fun ZonedDateTime.shouldHaveSameMonthAs(date: ZonedDateTime): Unit

shouldHaveSameYearAs

Asserts that this year is the same as date's year

infix fun ZonedDateTime.shouldHaveSameYearAs(date: ZonedDateTime): Unit

shouldNotBeAfter

Asserts that this is NOT after date

infix fun ZonedDateTime.shouldNotBeAfter(date: ZonedDateTime): Unit

shouldNotBeBefore

Asserts that this is NOT before date

infix fun ZonedDateTime.shouldNotBeBefore(date: ZonedDateTime): Unit

shouldNotBeBetween

Asserts that this is NOT between a and b

fun ZonedDateTime.shouldNotBeBetween(a: ZonedDateTime, b: ZonedDateTime): Unit

shouldNotBeToday

Asserts that the ZonedDateTime does not have a date component of today

fun ZonedDateTime.shouldNotBeToday(): Unit

shouldNotBeWithin

Asserts that this is NOT within temporalAmount of date

fun ZonedDateTime.shouldNotBeWithin(temporalAmount: TemporalAmount, date: ZonedDateTime): Unit

shouldNotHaveSameDayAs

Asserts that this day is NOT the same as date's day

infix fun ZonedDateTime.shouldNotHaveSameDayAs(date: ZonedDateTime): Unit

shouldNotHaveSameMonthAs

Asserts that this month is NOT the same as date's month

infix fun ZonedDateTime.shouldNotHaveSameMonthAs(date: ZonedDateTime): Unit

shouldNotHaveSameYearAs

Asserts that this year is NOT the same as date's year

infix fun ZonedDateTime.shouldNotHaveSameYearAs(date: ZonedDateTime): Unit