org.hamcrest.integration
Class JMock1Adapter

java.lang.Object
  extended by 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

Constructor Summary
JMock1Adapter(Matcher<?> matcher)
           
 
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
 

Constructor Detail

JMock1Adapter

public JMock1Adapter(Matcher<?> matcher)
Method Detail

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