Releases: Cornutum/hamcrest-composites
Release 1.3.0
Adds the following new components.
-
ContainsEntries: This matcher compares Map instances using a
MapEntryMatcherto perform a "deep match" on each map entry. When you build your ownBaseCompositeMatcherto compare complex objects, thecontainsEntriesMatchingmethod makes it possible to compare object properties of type Map. -
MapEntryMatcher: A composite matcher for Map entries. You can contruct one using a
MapEntryMatcher.Supplier, specifying a value matcher and (optionally) a key matcher. The default key matcher isequalTo.
1.2.2
Upgrade dependences to reliably use the latest distribution of hamcrest (currently 2.2)
1.2.1
ExpectedFailure.when: This method now has an optional failureMapper argument, which can be used to transform the thrown Throwable into the expected Throwable. Useful when verifying a specific exception cause.
1.2.0
Adds the following new components.
-
ListsMatching: Similar to
ListsMembers, this matcher verifies that an Iterable contains an expected sequence of members. UnlikeListMembers, this matcher does not compare members usingequals()but instead uses only a supplied memberMatcher.ListsMatchingis useful in situations where the memberequals()method is true iff the memberMatchermatches. In such situations,ListsMatchingwill provide more a more precise description of match failures. -
ClassCompositeMatcher: An extended base class for composite matchers that must verify the expected type of a matched object. Useful in situations where a composite matcher must verify a collection of X instances that may contain instances of different X subclasses.
1.1.3
-
Fixes a defect when conducting a "deep match" of an expected collection with the contents of an actual
Iterable. Prior to this fix, matching theIterablewas prematurely short-circuited and deep match failures were ignored. -
For better testability, add
toString()implementations to Matcher classes.
1.1.2
- Limits runtime dependency to hamcrest-core
1.1.1
-
BaseCompositeMatcher: Support matching sequence-valued properties, using listsMembersMatching, etc.
-
Javadoc: Fix links in Overview
1.1.0
-
Adds support for matching sequences in order, using
ListsMembers,ListsElements, andVisitsList. -
Adds
ExpectedFailure, a fluent interface for making assertions about an expected failure.
1.0.0
Initial release