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

Extensions for java.time.LocalDate

shouldBeAfter

Asserts that this is after date

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

shouldBeBefore

Asserts that this is before date

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

shouldBeBetween

Asserts that this is between a and b

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

shouldBeToday

Asserts that the LocalDate is today

fun LocalDate.shouldBeToday(): Unit

shouldBeWithin

Asserts that this is within period of date

fun LocalDate.shouldBeWithin(period: Period, date: LocalDate): Unit

shouldHaveSameDayAs

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

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

shouldHaveSameMonthAs

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

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

shouldHaveSameYearAs

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

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

shouldNotBeAfter

Asserts that this is NOT after date

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

shouldNotBeBefore

Asserts that this is NOT before date

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

shouldNotBeBetween

Asserts that this is NOT between a and b

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

shouldNotBeToday

Asserts that the LocalDate is not today

fun LocalDate.shouldNotBeToday(): Unit

shouldNotBeWithin

Asserts that this is NOT within period of date

fun LocalDate.shouldNotBeWithin(period: Period, date: LocalDate): Unit

shouldNotHaveSameDayAs

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

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

shouldNotHaveSameMonthAs

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

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

shouldNotHaveSameYearAs

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

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