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

Extensions for java.time.Instant

shouldBeAfter

Assert that Instant is after anotherInstant.

infix fun Instant.shouldBeAfter(anotherInstant: Instant): Unit

shouldBeBefore

Assert that Instant is before anotherInstant.

infix fun Instant.shouldBeBefore(anotherInstant: Instant): Unit

shouldBeBetween

Assert that Instant is between fromInstant and toInstant.

fun Instant.shouldBeBetween(fromInstant: Instant, toInstant: Instant): Unit

shouldNotBeAfter

Assert that Instant is not after anotherInstant.

infix fun Instant.shouldNotBeAfter(anotherInstant: Instant): Unit

shouldNotBeBefore

Assert that Instant is not before anotherInstant.

infix fun Instant.shouldNotBeBefore(anotherInstant: Instant): Unit

shouldNotBeBetween

Assert that Instant is between fromInstant and toInstant.

fun Instant.shouldNotBeBetween(fromInstant: Instant, toInstant: Instant): Unit