JMock1Adapter (Hamcrest)
Date: 2018-08-04

org.hamcrest.integration

## Class JMock1Adapter

- java.lang.Object
- - org.hamcrest.integration.JMock1Adapter

-     public class JMock1Adapter
      extends java.lang.Object

  An adapter allowing a 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.
  Author:
    Joe Walnes

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JMock1Adapter(Matcher<?> matcher)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Constraint` | `adapt(Matcher<?> matcher)` Convenience factory method that will adapt a Hamcrest `Matcher` to act as an jMock `org.jmock.core.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 Constraint adapt(Matcher<?> matcher)

      Convenience factory method that will adapt a Hamcrest `Matcher` to act as an jMock `org.jmock.core.Constraint`.

    - #### eval

          public boolean eval(java.lang.Object o)

    - #### describeTo

          public java.lang.StringBuffer describeTo(java.lang.StringBuffer buffer)