org.hamcrest.Matcher
to act as an jMock1 org.jmock.core.Constraint .
Note, this is not necessary for jMock2 as it supports Hamcrest
out of the box.
| Modifier and Type | Field and Description |
|---|---|
| private final Matcher |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Constraint | adapt(Matcher<?> matcher)
Convenience factory method that will adapt a
Hamcrest |
| public StringBuffer | describeTo(StringBuffer
The buffer that the description is appended to. buffer)Implements org. |
| public boolean | eval(Object
the object against which the constraint is evaluated. o)Implements org. |
| hamcrestMatcher | back to summary |
|---|---|
| private final Matcher<?> hamcrestMatcher | |
| JMock1Adapter | back to summary |
|---|---|
| public JMock1Adapter(Matcher<?> matcher) | |
| adapt | back to summary |
|---|---|
| public static Constraint adapt(Matcher<?> matcher) Convenience factory method that will adapt a
Hamcrest | |
| describeTo | back to summary |
|---|---|
| public StringBuffer describeTo(StringBuffer buffer) Implements org. Doc from org. Appends the description of this object to the buffer.
| |
| eval | back to summary |
|---|---|
| public boolean eval(Object o) Implements org. Doc from org. Evaluates the constraint for argument o. | |