Package org.jmock.api

Class ExpectationError

java.lang.Object
java.lang.Throwable
java.lang.Error
org.jmock.api.ExpectationError
All Implemented Interfaces:
Serializable, org.hamcrest.SelfDescribing

public class ExpectationError extends Error implements org.hamcrest.SelfDescribing
An error thrown when an expectation is violated during a test.
See Also:
  • Field Details

    • expectations

      public final org.hamcrest.SelfDescribing expectations
    • invocation

      public final Invocation invocation
  • Constructor Details

    • ExpectationError

      public ExpectationError(String message, org.hamcrest.SelfDescribing expectations, Invocation invocation)
  • Method Details

    • unexpected

      public static ExpectationError unexpected(String message, Invocation invocation)
    • notAllSatisfied

      public static ExpectationError notAllSatisfied(org.hamcrest.SelfDescribing expectations)
    • toString

      public String toString()
      Overrides:
      toString in class Throwable
    • describeTo

      public void describeTo(org.hamcrest.Description description)
      Specified by:
      describeTo in interface org.hamcrest.SelfDescribing