kotest-assertions / io.kotest.matchers.date

Package io.kotest.matchers.date

Functions

after

Matcher that compares two Dates and checks whether one is after the other

fun after(other: <ERROR CLASS>): Matcher<<ERROR CLASS>>

before

Matcher that compares two Dates and checks whether one is before the other

fun before(date: <ERROR CLASS>): Matcher<<ERROR CLASS>>

haveSameHours

Matcher that compares hours of Dates

fun haveSameHours(other: <ERROR CLASS>): Matcher<<ERROR CLASS>>

shouldBeAfter

Asserts that this is after other

infix fun <ERROR CLASS>.shouldBeAfter(other: <ERROR CLASS>): <ERROR CLASS>

shouldBeBefore

Asserts that this is before other

infix fun <ERROR CLASS>.shouldBeBefore(other: <ERROR CLASS>): <ERROR CLASS>

shouldHaveDayOfMonth

Asserts that the date has the given day of month 1-31.

infix fun <ERROR CLASS>.shouldHaveDayOfMonth(day: Int): <ERROR CLASS>

shouldHaveDayOfWeek

Asserts that the date has the given day of week 0-6.

infix fun <ERROR CLASS>.shouldHaveDayOfWeek(day: Int): <ERROR CLASS>

shouldHaveHour

Asserts that the hour inputted is equaled the date time hour

infix fun <ERROR CLASS>.shouldHaveHour(hour: Int): <ERROR CLASS>

shouldHaveMinute

Asserts that the minute inputted is equaled the date time minute

infix fun <ERROR CLASS>.shouldHaveMinute(minute: Int): <ERROR CLASS>

shouldHaveMonth

Asserts that the month inputted is equaled the date month

infix fun <ERROR CLASS>.shouldHaveMonth(month: Int): <ERROR CLASS>

shouldHaveSameHoursAs

Asserts that hours in this Date are the same as the given date.

infix fun <ERROR CLASS>.shouldHaveSameHoursAs(other: <ERROR CLASS>): <ERROR CLASS>

shouldHaveSecond

Asserts that the second inputted is equaled the date time second

infix fun <ERROR CLASS>.shouldHaveSecond(second: Int): <ERROR CLASS>

shouldHaveYear

Asserts that the date has the given year.

infix fun <ERROR CLASS>.shouldHaveYear(year: Int): <ERROR CLASS>

shouldNotBeAfter

Asserts that this is NOT after other

infix fun <ERROR CLASS>.shouldNotBeAfter(other: <ERROR CLASS>): <ERROR CLASS>

shouldNotBeBefore

Asserts that this is NOT before other

infix fun <ERROR CLASS>.shouldNotBeBefore(other: <ERROR CLASS>): <ERROR CLASS>

shouldNotHaveSameHoursAs

Asserts that hours in this Date are NOT the same as other's hours

infix fun <ERROR CLASS>.shouldNotHaveSameHoursAs(other: <ERROR CLASS>): <ERROR CLASS>