public class

ReflectionEqualTo

extends TypeSafeMatcher<T>
java.lang.Object
   ↳ org.hamcrest.BaseMatcher<T>
     ↳ org.junit.internal.matchers.TypeSafeMatcher<T>
       ↳ com.atlassian.jira.matchers.ReflectionEqualTo<T>

Class Overview

Matcher that uses reflectionEquals(Object, Object) instead of a class's equals(Object) implementation.

Summary

Public Constructors
ReflectionEqualTo(T expected)
Creates a new ReflectionEqualTo matcher with the expected value.
Public Methods
void describeTo(Description description)
boolean matchesSafely(T actual)
static <T> Matcher<T> reflectionEqualTo(T expected)
Matcher that compares objects using reflection.
[Expand]
Inherited Methods
From class org.junit.internal.matchers.TypeSafeMatcher
From class org.hamcrest.BaseMatcher
From class java.lang.Object
From interface org.hamcrest.Matcher
From interface org.hamcrest.SelfDescribing

Public Constructors

public ReflectionEqualTo (T expected)

Creates a new ReflectionEqualTo matcher with the expected value.

Parameters
expected the expected value

Public Methods

public void describeTo (Description description)

public boolean matchesSafely (T actual)

public static Matcher<T> reflectionEqualTo (T expected)

Matcher that compares objects using reflection.

Parameters
expected the expected object
Returns
  • a Matcher