infix fun LocalTime.shouldHaveSameHoursAs(time: LocalTime): Unit
Asserts that hours in this time are the same as time's hours
Verifies that hours in this time are the same as time's hours, ignoring any other fields. For example, 16:59:59:7777 has the same hours as 16:01:02:0001, and this assertion should pass for this comparison
Opposite of LocalTime.shouldNotHaveSameHoursAs
val firstTime = LocalTime.of(23, 59, 30, 1000)
val secondTime = LocalTime.of(23, 1, 2, 3333)
firstTime shouldHaveSameHoursAs secondTime // Assertion passes
val firstTime = LocalTime.of(23, 59, 30, 1000)
val secondTime = LocalTime.of(16, 59, 30, 1000)
firstTime shouldHaveSameHoursAs secondTime // Assertion fails, 23 != 16