com.atlassian
Class ReflectionEqualTo<T>
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.junit.internal.matchers.TypeSafeMatcher<T>
com.atlassian.ReflectionEqualTo<T>
- All Implemented Interfaces:
- org.hamcrest.Matcher<T>, org.hamcrest.SelfDescribing
public class ReflectionEqualTo<T>
- extends org.junit.internal.matchers.TypeSafeMatcher<T>
Matcher that uses EqualsBuilder.reflectionEquals(Object, Object)
instead of a
class's equals(Object) implementation.
- Since:
- v4.4
Constructor Summary |
ReflectionEqualTo(T expected)
Creates a new ReflectionEqualTo matcher with the expected value. |
Method Summary |
void |
describeTo(org.hamcrest.Description description)
|
boolean |
matchesSafely(T actual)
|
static
<T> org.hamcrest.Matcher<T> |
|
reflectionEqualTo(T expected)
Matcher that compares objects using reflection. |
Methods inherited from class org.junit.internal.matchers.TypeSafeMatcher |
matches |
Methods inherited from class org.hamcrest.BaseMatcher |
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, toString |
ReflectionEqualTo
public ReflectionEqualTo(T expected)
- Creates a new ReflectionEqualTo matcher with the expected value.
- Parameters:
expected
- the expected value
reflectionEqualTo
public static <T> org.hamcrest.Matcher<T> reflectionEqualTo(T expected)
- Matcher that compares objects using reflection.
- Parameters:
expected
- the expected object
- Returns:
- a Matcher
matchesSafely
public boolean matchesSafely(T actual)
- Specified by:
matchesSafely
in class org.junit.internal.matchers.TypeSafeMatcher<T>
describeTo
public void describeTo(org.hamcrest.Description description)
Copyright © 2002-2011 Atlassian. All Rights Reserved.