Package org.spockframework.mock
Class WrongInvocationOrderError
java.lang.Object
java.lang.Throwable
java.lang.Error
java.lang.AssertionError
org.spockframework.runtime.SpockAssertionError
org.spockframework.mock.InteractionNotSatisfiedError
org.spockframework.mock.WrongInvocationOrderError
- All Implemented Interfaces:
Serializable
Thrown if an invocation on a mock object occurs too late. Example:
when: ... then: 1 * foo.me() 1 * bar.me() then: // indicates that subsequent interactions must take place after previous interactions 1 * baz.me()Assuming the following invocation order:
- bar.me()
- baz.me()
- foo.me()
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWrongInvocationOrderError
(IMockInteraction interaction, IMockInvocation lastInvocation) -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class org.spockframework.runtime.SpockAssertionError
toString
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
WrongInvocationOrderError
-
-
Method Details
-
getInteraction
-
getLastInvocation
-
getMessage
- Overrides:
getMessage
in classThrowable
-