fun LocalDate.shouldNotBeBetween(a: LocalDate, b: LocalDate): Unit
Asserts that this is NOT between a and b
Verifies that this is not after a and before b, comparing year, month and day.
Opposite of LocalDate.shouldBeBetween
val date = LocalDate.of(2019, 2, 15)
val firstDate = LocalDate.of(2019, 2, 16)
val secondDate = LocalDate.of(2019, 2, 17)
date.shouldNotBeBetween(firstDate, secondDate) // Assertion passes
val date = LocalDate.of(2019, 2, 16)
val firstDate = LocalDate.of(2019, 2, 15)
val secondDate = LocalDate.of(2019, 2, 17)
date.shouldNotBeBetween(firstDate, secondDate) // Assertion fails, date IS between firstDate and secondDate
See Also