Package org.axonframework.test.matchers
Class DeepEqualsMatcher<T>
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.axonframework.test.matchers.DeepEqualsMatcher<T>
- Type Parameters:
T- The type of object to match.
- All Implemented Interfaces:
org.hamcrest.Matcher<T>,org.hamcrest.SelfDescribing
public class DeepEqualsMatcher<T>
extends org.hamcrest.BaseMatcher<T>
A
BaseMatcher implementation that first matches based on Object.equals(Object). When this fails and
equals() is not overridden from Object by T, the instance's field values are checked for
equality. If this fails due to inaccessibility of the class or its fields, this matcher will not match.- Since:
- 4.5.10
- Author:
- Steven van Beelen
-
Constructor Summary
ConstructorsConstructorDescriptionDeepEqualsMatcher(T expected) DeepEqualsMatcher(T expected, FieldFilter filter) -
Method Summary
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, isNotNull, toString
-
Constructor Details
-
DeepEqualsMatcher
- Parameters:
expected- The object to match with duringmatches(Object).
-
DeepEqualsMatcher
- Parameters:
expected- The object to match with duringmatches(Object).filter- The filter describing the fields to include or exclude in the comparison.
-
-
Method Details
-
matches
-
describeTo
public void describeTo(org.hamcrest.Description description)
-