com.atlassian
Class ReflectionEqualTo<T>

java.lang.Object
  extended by org.hamcrest.BaseMatcher<T>
      extended by org.junit.internal.matchers.TypeSafeMatcher<T>
          extended by 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_, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReflectionEqualTo

public ReflectionEqualTo(T expected)
Creates a new ReflectionEqualTo matcher with the expected value.

Parameters:
expected - the expected value
Method Detail

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-2012 Atlassian. All Rights Reserved.