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

shouldHaveHour

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

Asserts that the hour inputted is equaled the date time hour

    val date = LocalDateTime.of(2019, 2, 15, 12, 10, 0, 0)

    date.shouldHaveHour(12) // Assertion passes