org.jmock.api

## Class ExpectationError

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Error
    - - org.jmock.api.ExpectationError

All Implemented Interfaces:
  Serializable, SelfDescribing

    public class ExpectationError
    extends Error
    implements SelfDescribing

An error thrown when an expectation is violated during a test.

Author:
  npryce
See Also:
  Serialized Form

### Field Summary

Fields
`SelfDescribing` `expectations`
`Invocation` `invocation`

### Constructor Summary

Constructors
Constructor and Description
`ExpectationError(String message, SelfDescribing expectations, Invocation invocation)`

### Method Summary

Methods
`void` `describeTo(Description description)`
`static ExpectationError` `notAllSatisfied(SelfDescribing expectations)`
`String` `toString()`
`static ExpectationError` `unexpected(String message, Invocation invocation)`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

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

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

### Field Detail

#### expectations

    public final SelfDescribing expectations

#### invocation

    public final Invocation invocation

### Constructor Detail

#### ExpectationError

    public ExpectationError(String message,
                    SelfDescribing expectations,
                    Invocation invocation)

### Method Detail

#### unexpected

    public static ExpectationError unexpected(String message,
                              Invocation invocation)

#### notAllSatisfied

    public static ExpectationError notAllSatisfied(SelfDescribing expectations)

#### toString

    public String toString()

Overrides:
  `toString` in class `Throwable`

#### describeTo

    public void describeTo(Description description)

Specified by:
  `describeTo` in interface `SelfDescribing`