Added
- Add
isDataClassEqualTo
for better messaging when comparing data classes. - Add
matchesPredicate
to match against a predicate function/lambda. - Add
atLeast
iterable assertion which passes if the assertion on each item passes at least n times. - Add
isCloseTo
for floats and doubles to check that a value is within a delta of what's expected. - Add
lines
andbytes
to Path assertions for asserting on a file's contents. - Add
containsOnly
for Collection assertions.
Changed
- Sort
containsExactly
output by index to make it easier to compare. containsAll
now includes the expected map.
Fixed
- Number assertions now work correctly on BigInteger and BigDecimal
- Soft assertions breaking if exception is thrown.
Deprecated
- Deprecated
assert
in favor ofassertThat
. - Deprecated accessing the
actual
value on an assertion directly. Instead usegiven
which will provide it in a lambda. - Deprecated some methods that took a lambda, replacing them with versions that chain instead.
isNotNull()
isInstanceOf()
index()
key()
Breaking Changes
- Previously deprecated methods (as of 0.10) are now errors.