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

shouldHaveMonth

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

Asserts that the month inputted is equaled the date month

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

    date.shouldHaveMonth(2) // Assertion passes
    date.shouldHaveMonth(FEBRUARY) // Assertion passes
infix fun LocalDateTime.shouldHaveMonth(month: Month): Unit