import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.failBecauseExceptionWasNotThrown;
This contract checks:
- compare with argument that can't be cast to correct type throws ClassCastException
- returns 0 on equality
- returns less then zero on less then
- returns greater then zero on greater
- Null values throw a NullPointerException (see below)
The jdk contract does not specify how nulls are handled. The possibilities are nulls constitute an error,
they are ordered first, or ordered last. This contract defaults to the error case, but the behavior can
be controlled by calling setNulls() with the appropriate value.
Nulls throw NullPointerException.
Nulls are considered to be ordered first.
Nulls are considered to be ordered last.
nulls How nulls should be treated.