toBeLessThanOrEqualTo
Expects that the subject of this expectation is less than or equal (<=) expected. The comparison is carried out with Comparable.compareTo.
You could also use notToBeGreaterThan which is logically equivalent.
Return
an Expect for the subject of this expectation.
Since
0.17.0
Samples
expect(1).toBeLessThanOrEqualTo(2)
expect(2).toBeLessThanOrEqualTo(2)
fails {
expect(2).toBeLessThanOrEqualTo(1)
}Deprecated
'toBeLessThanOrEqualTo' is deprecated in favour of 'toBeBeforeOrTheSamePointInTimeAs' which is based on ChronoZonedDateTime.isBefore and ChronoZonedDateTime.isEqual instead of compareTo
Replace with
toBeBeforeOrTheSamePointInTimeAs(expected)Deprecated overload which shall help users to use toBeBeforeOrTheSamePointInTimeAs instead.
Since
1.0.0
Deprecated
'toBeLessThanOrEqualTo' is deprecated in favour of 'toBeBeforeOrTheSamePointInTimeAs' which is based on OffsetDateTime.isBefore and OffsetDateTime.isEqual instead of compareTo
Replace with
toBeBeforeOrTheSamePointInTimeAs(expected)Deprecated overload which shall help users to use toBeBeforeOrTheSamePointInTimeAs instead.
Since
1.3.0