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 java.lang.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
Method Summary |
static org.jmock.core.Constraint |
adapt(Matcher<?> matcher)
Convenience factory method that will adapt a
Hamcrest Matcher to act as an
jMock Constraint . |
java.lang.StringBuffer |
describeTo(java.lang.StringBuffer buffer)
|
boolean |
eval(java.lang.Object o)
|
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(java.lang.Object o)
- Specified by:
eval
in interface org.jmock.core.Constraint
describeTo
public java.lang.StringBuffer describeTo(java.lang.StringBuffer buffer)
- Specified by:
describeTo
in interface org.jmock.core.SelfDescribing