toBeLessThan

infix fun <T : Comparable<T>> Expect<T>.toBeLessThan(expected: T): Expect<T>(source)

Expects that the subject of this expectation is less than (<) expected. The comparison is carried out with Comparable.compareTo.

Return

an Expect for the subject of this expectation.

Since

0.17.0

Samples

expect(1) toBeLessThan 2

fails {
    expect(2) toBeLessThan 1
}
infix fun <T : ChronoZonedDateTime<T>> Expect<T>.toBeLessThan(expected: T): Nothing(source)

Deprecated

'toBeLessThan' is deprecated in favour of 'toBeBefore' which is based on ChronoZonedDateTime.isBefore instead of compareTo

Replace with

toBeBefore(expected)

Deprecated overload which shall give a hint to the user/guide the user to use toBeBefore instead.

Since

1.0.0