public final class Matchers extends Object
Constructor and Description |
---|
Matchers() |
Modifier and Type | Method and Description |
---|---|
static org.hamcrest.Matcher<PropertyChangeEvent> |
anyProperty()
A matcher for any property change.
|
static <T> org.hamcrest.Matcher<T> |
equivalentTo(T object)
This matcher returns
true when the arguments are equivalent. |
static org.hamcrest.Matcher<PropertyChangeEvent> |
property(String propertyName,
Object oldValue,
Object newValue)
A matcher for a specified property.
|
static org.hamcrest.Matcher<PropertyChangeEvent> |
propertyWithName(String propertyName)
A matcher for a specified property.
|
public static org.hamcrest.Matcher<PropertyChangeEvent> anyProperty()
true
if any property can be matched; false
otherwisepublic static org.hamcrest.Matcher<PropertyChangeEvent> propertyWithName(String propertyName)
propertyName
- the name of the property to matchtrue
if the property exists and has a name that matches the specified name;
false
otherwisepublic static org.hamcrest.Matcher<PropertyChangeEvent> property(String propertyName, Object oldValue, Object newValue)
propertyName
- the name of the property to matcholdValue
- the old property valuenewValue
- the new property valuetrue
if the property exists and all parameters match the specified values;
false
otherwisepublic static <T> org.hamcrest.Matcher<T> equivalentTo(T object)
true
when the arguments are equivalent.
For purposes of this matcher equivalence is as follows:
class
info
for each object instance returns equivalent valuesT
- the type of the matcherobject
- the object to testtrue
if the object is equivalent; false
otherwiseCopyright © 2017. All rights reserved.