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

Extensions for java.time.OffsetDateTime

shouldBeAfter

Asserts that this is after date

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

shouldBeBefore

Asserts that this is before date

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

shouldBeBetween

Asserts that this is between a and b

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

shouldBeToday

Asserts that the OffsetDateTime has a date component of today

fun OffsetDateTime.shouldBeToday(): Unit

shouldBeWithin

Asserts that this is within temporalAmount of date

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

shouldHaveSameDayAs

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

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

shouldHaveSameMonthAs

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

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

shouldHaveSameYearAs

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

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

shouldNotBeAfter

Asserts that this is NOT after date

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

shouldNotBeBefore

Asserts that this is NOT before date

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

shouldNotBeBetween

Asserts that this is NOT between a and b

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

shouldNotBeToday

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

fun OffsetDateTime.shouldNotBeToday(): Unit

shouldNotBeWithin

Asserts that this is NOT within temporalAmount of date

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

shouldNotHaveSameDayAs

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

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

shouldNotHaveSameMonthAs

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

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

shouldNotHaveSameYearAs

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

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