toBeGreaterThan

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

Expects that the subject of this expectation is greater 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(2) toBeGreaterThan 1

fails {
    expect(2) toBeGreaterThan 2
}

Deprecated

'toBeGreaterThan' is deprecated in favour of 'toBeAfter' which is based on ChronoZonedDateTime.isAfter instead of compareTo

Replace with

toBeAfter(expected)

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

Since

1.0.0