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

Extensions for java.time.LocalDateTime

shouldBeAfter

Asserts that this is after date

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

shouldBeBefore

Asserts that this is before date

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

shouldBeBetween

Asserts that this is between a and b

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

shouldBeToday

Asserts that the LocalDateTime has a date component of today

fun LocalDateTime.shouldBeToday(): Unit

shouldBeWithin

Asserts that this is within temporalAmount of date

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

shouldHaveDayOfMonth

Asserts that the day of month inputted is equaled the date day

infix fun LocalDateTime.shouldHaveDayOfMonth(day: Int): Unit

shouldHaveDayOfWeek

Asserts that the day of year inputted is equaled the date day

infix fun LocalDateTime.shouldHaveDayOfWeek(day: Int): Unitinfix fun LocalDateTime.shouldHaveDayOfWeek(day: DayOfWeek): Unit

shouldHaveDayOfYear

Asserts that the day of year inputted is equaled the date day

infix fun LocalDateTime.shouldHaveDayOfYear(day: Int): Unit

shouldHaveHour

Asserts that the hour inputted is equaled the date time hour

infix fun LocalDateTime.shouldHaveHour(hour: Int): Unit

shouldHaveMinute

Asserts that the minute inputted is equaled the date time minute

infix fun LocalDateTime.shouldHaveMinute(minute: Int): Unit

shouldHaveMonth

Asserts that the month inputted is equaled the date month

infix fun LocalDateTime.shouldHaveMonth(month: Int): Unitinfix fun LocalDateTime.shouldHaveMonth(month: Month): Unit

shouldHaveNano

Asserts that the nano inputted is equaled the date time nano

infix fun LocalDateTime.shouldHaveNano(nano: Int): Unit

shouldHaveSameDayAs

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

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

shouldHaveSameMonthAs

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

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

shouldHaveSameYearAs

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

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

shouldHaveSecond

Asserts that the second inputted is equaled the date time second

infix fun LocalDateTime.shouldHaveSecond(second: Int): Unit

shouldNotBeAfter

Asserts that this is NOT after date

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

shouldNotBeBefore

Asserts that this is NOT before date

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

shouldNotBeBetween

Asserts that this is NOT between a and b

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

shouldNotBeToday

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

fun LocalDateTime.shouldNotBeToday(): Unit

shouldNotBeWithin

Asserts that this is NOT within temporalAmount of date

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

shouldNotHaveSameDayAs

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

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

shouldNotHaveSameMonthAs

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

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

shouldNotHaveSameYearAs

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

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