TestFailureMatcher
Date: 2015-09-15

org.jmock.core.matcher

## Class TestFailureMatcher

- java.lang.Object
- - org.jmock.core.matcher.TestFailureMatcher

- All Implemented Interfaces:
    InvocationMatcher, SelfDescribing, Verifiable

      public class TestFailureMatcher
      extends java.lang.Object
      implements InvocationMatcher

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestFailureMatcher(java.lang.String errorMessage)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.StringBuffer` | `describeTo(java.lang.StringBuffer buffer)` Appends the description of this object to the buffer.
    `boolean` | `hasDescription()`
    `void` | `invoked(Invocation invocation)`
    `boolean` | `matches(Invocation invocation)`
    `void` | `verify()` Throw an AssertionFailedException if any expectations have not been met.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TestFailureMatcher

          public TestFailureMatcher(java.lang.String errorMessage)

  - ### Method Detail

    - #### matches

          public boolean matches(Invocation invocation)

      Specified by:
        `matches` in interface `InvocationMatcher`

    - #### hasDescription

          public boolean hasDescription()

      Specified by:
        `hasDescription` in interface `InvocationMatcher`

    - #### describeTo

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

      Description copied from interface: `SelfDescribing`
      Appends the description of this object to the buffer.
      Specified by:
        `describeTo` in interface `SelfDescribing`
      Parameters:
        `buffer` - The buffer that the description is appended to.
      Returns:
        The buffer passed to the invokedMethod.

    - #### invoked

          public void invoked(Invocation invocation)

      Specified by:
        `invoked` in interface `InvocationMatcher`

    - #### verify

          public void verify()

      Description copied from interface: `Verifiable`
      Throw an AssertionFailedException if any expectations have not been met. Implementations of this method must be idempotent: jMock can call this method more than once when verifying expectations at the end of a test.
      Specified by:
        `verify` in interface `Verifiable`