Package org.jmock.api
Class ExpectationError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Error
-
- org.jmock.api.ExpectationError
-
- All Implemented Interfaces:
java.io.Serializable,org.hamcrest.SelfDescribing
public class ExpectationError extends java.lang.Error implements org.hamcrest.SelfDescribingAn error thrown when an expectation is violated during a test.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description org.hamcrest.SelfDescribingexpectationsInvocationinvocation
-
Constructor Summary
Constructors Constructor Description ExpectationError(java.lang.String message, org.hamcrest.SelfDescribing expectations, Invocation invocation)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddescribeTo(org.hamcrest.Description description)static ExpectationErrornotAllSatisfied(org.hamcrest.SelfDescribing expectations)java.lang.StringtoString()static ExpectationErrorunexpected(java.lang.String message, Invocation invocation)
-
-
-
Field Detail
-
expectations
public final org.hamcrest.SelfDescribing expectations
-
invocation
public final Invocation invocation
-
-
Constructor Detail
-
ExpectationError
public ExpectationError(java.lang.String message, org.hamcrest.SelfDescribing expectations, Invocation invocation)
-
-
Method Detail
-
unexpected
public static ExpectationError unexpected(java.lang.String message, Invocation invocation)
-
notAllSatisfied
public static ExpectationError notAllSatisfied(org.hamcrest.SelfDescribing expectations)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Throwable
-
describeTo
public void describeTo(org.hamcrest.Description description)
- Specified by:
describeToin interfaceorg.hamcrest.SelfDescribing
-
-