doc / ch.tutteli.atrium.api.fluent.en_GB / toBeLessThanOrEqualTo

toBeLessThanOrEqualTo

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

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.

expect(1).toBeLessThanOrEqualTo(2)
expect(2).toBeLessThanOrEqualTo(2)

fails {
    expect(2).toBeLessThanOrEqualTo(1)
}

Return
an Expect for the subject of this expectation.

Since
0.17.0