Skip to content

Releases: Cornutum/hamcrest-composites

Release 1.3.0

26 Apr 15:49

Choose a tag to compare

Adds the following new components.

  • ContainsEntries: This matcher compares Map instances using a MapEntryMatcher to perform a "deep match" on each map entry. When you build your own BaseCompositeMatcher to compare complex objects, the containsEntriesMatching method 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 is equalTo.

1.2.2

29 Jun 23:14

Choose a tag to compare

Upgrade dependences to reliably use the latest distribution of hamcrest (currently 2.2)

1.2.1

29 Oct 18:04

Choose a tag to compare

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

08 Jul 23:21

Choose a tag to compare

Adds the following new components.

  • ListsMatching: Similar to ListsMembers, this matcher verifies that an Iterable contains an expected sequence of members. Unlike ListMembers, this matcher does not compare members using equals() but instead uses only a supplied member Matcher. ListsMatching is useful in situations where the member equals() method is true iff the member Matcher matches. In such situations, ListsMatching will 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

19 Mar 22:05

Choose a tag to compare

  • Fixes a defect when conducting a "deep match" of an expected collection with the contents of an actual Iterable. Prior to this fix, matching the Iterable was prematurely short-circuited and deep match failures were ignored.

  • For better testability, add toString() implementations to Matcher classes.

1.1.2

24 Sep 18:54

Choose a tag to compare

  • Limits runtime dependency to hamcrest-core

1.1.1

23 Sep 17:32

Choose a tag to compare

  • BaseCompositeMatcher: Support matching sequence-valued properties, using listsMembersMatching, etc.

  • Javadoc: Fix links in Overview

1.1.0

21 Sep 21:11

Choose a tag to compare

  • Adds support for matching sequences in order, using ListsMembers, ListsElements, and VisitsList.

  • Adds ExpectedFailure, a fluent interface for making assertions about an expected failure.

1.0.0

18 Sep 21:08
4faf3e8

Choose a tag to compare

Initial release