org.hamcrest.integration
Class JMock1Adapter
java.lang.Object
org.hamcrest.integration.JMock1Adapter
- All Implemented Interfaces:
- org.jmock.core.Constraint, org.jmock.core.SelfDescribing
public class JMock1Adapter
- extends Object
- implements org.jmock.core.Constraint
An adapter allowing a Hamcrest Matcher
to act as an jMock1 Constraint
.
Note, this is not necessary for jMock2 as it supports Hamcrest
out of the box.
- Author:
- Joe Walnes
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JMock1Adapter
public JMock1Adapter(Matcher<?> matcher)
adapt
public static org.jmock.core.Constraint adapt(Matcher<?> matcher)
- Convenience factory method that will adapt a
Hamcrest
Matcher
to act as an
jMock Constraint
.
eval
public boolean eval(Object o)
- Specified by:
eval
in interface org.jmock.core.Constraint
describeTo
public StringBuffer describeTo(StringBuffer buffer)
- Specified by:
describeTo
in interface org.jmock.core.SelfDescribing