infix fun LocalTime.shouldBeBefore(time: LocalTime): Unit
Asserts that this is before time
Verifies that this is before time, comparing hours, minutes, seconds, nanos. For example, 12:30:59:2222 is before 12:30:59:3333, and this assertion should pass for this comparison.
Opposite of LocalTime.shouldNotBeBefore
val firstTime = LocalTime.of(12:30:59:2222)
val secondTime = LocalTime.of(12:30:59:3333)
firstTime shouldBeBefore secondTime // Assertion passes
val firstTime = LocalTime.of(14:30:59:2222)
val secondTime = LocalTime.of(12:30:59:2222)
firstTime shouldBeBefore secondTime // Assertion fails, 14:30:59:2222 is not before 12:30:59:2222 as expected.
See Also