Skip to content

v0.13

Compare
Choose a tag to compare
@evant evant released this 13 Jul 14:15
c2ecbf8

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 and bytes 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 of assertThat.
  • Deprecated accessing the actual value on an assertion directly. Instead use given 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.