Package org.hamcrest.beans
Class SamePropertyValuesAs.PropertyMatcher
- java.lang.Object
-
- org.hamcrest.BaseMatcher<T>
-
- org.hamcrest.DiagnosingMatcher<java.lang.Object>
-
- org.hamcrest.beans.SamePropertyValuesAs.PropertyMatcher
-
- All Implemented Interfaces:
Matcher<java.lang.Object>
,SelfDescribing
- Enclosing class:
- SamePropertyValuesAs<T>
private static class SamePropertyValuesAs.PropertyMatcher extends DiagnosingMatcher<java.lang.Object>
-
-
Field Summary
Fields Modifier and Type Field Description private Matcher<java.lang.Object>
matcher
private java.lang.String
propertyName
private java.lang.reflect.Method
readMethod
-
Constructor Summary
Constructors Constructor Description PropertyMatcher(java.beans.PropertyDescriptor descriptor, java.lang.Object expectedObject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
describeTo(Description description)
Generates a description of the object.boolean
matches(java.lang.Object actual, Description mismatch)
-
Methods inherited from class org.hamcrest.DiagnosingMatcher
describeMismatch, matches
-
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
-
-
-
-
Field Detail
-
readMethod
private final java.lang.reflect.Method readMethod
-
matcher
private final Matcher<java.lang.Object> matcher
-
propertyName
private final java.lang.String propertyName
-
-
Method Detail
-
matches
public boolean matches(java.lang.Object actual, Description mismatch)
- Specified by:
matches
in classDiagnosingMatcher<java.lang.Object>
-
describeTo
public void describeTo(Description description)
Description copied from interface:SelfDescribing
Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.- Parameters:
description
- The description to be built or appended to.
-
-