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.- Author:
- npryce
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description org.hamcrest.SelfDescribing
expectations
Invocation
invocation
-
Constructor Summary
Constructors Constructor Description ExpectationError(String message, org.hamcrest.SelfDescribing expectations, Invocation invocation)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
describeTo(org.hamcrest.Description description)
static ExpectationError
notAllSatisfied(org.hamcrest.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
-
-
-
-
Field Detail
-
expectations
public final org.hamcrest.SelfDescribing expectations
-
invocation
public final Invocation invocation
-
-
Constructor Detail
-
ExpectationError
public ExpectationError(String message, org.hamcrest.SelfDescribing expectations, Invocation invocation)
-
-
Method Detail
-
unexpected
public static ExpectationError unexpected(String message, Invocation invocation)
-
notAllSatisfied
public static ExpectationError notAllSatisfied(org.hamcrest.SelfDescribing expectations)
-
describeTo
public void describeTo(org.hamcrest.Description description)
- Specified by:
describeTo
in interfaceorg.hamcrest.SelfDescribing
-
-