|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException biz.xsoftware.mock.ExpectFailedException
public class ExpectFailedException
This Exception is thrown when something is expected to happen and doesn't. It is basically the assert failing. When MockSuperclass.expectEvent is called and the event doesn't come, this exception is thrown.
Field Summary | |
---|---|
static String |
TIMED_OUT
Expect failed because an event never came and waiting finally timed out. |
static String |
UNEXPECTED_CALL_AFTER
Expect failed because a method you did not list in expected methods was called after all your expected methods were called. |
static String |
UNEXPECTED_CALL_BEFORE
Expect failed because a method you did not list in expected methods was called before or during the other methods you did expect. |
static String |
UNEXPECTED_ON_NONE
Expect failed because you expected no methods to be called, but a method was called. |
Constructor Summary | |
---|---|
ExpectFailedException(String message,
CalledMethod[] methods,
String reason)
Constructor for Expects that fail with a reason and message. |
Method Summary | |
---|---|
CalledMethod[] |
getCalledMethods()
Gives you back the CalledMethods giving you access to the parameters that were passed in and the stack traces of how they were called. |
String |
getReason()
Gets the reason expecting the call(s) failed. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String TIMED_OUT
public static final String UNEXPECTED_CALL_AFTER
public static final String UNEXPECTED_CALL_BEFORE
public static final String UNEXPECTED_ON_NONE
Constructor Detail |
---|
public ExpectFailedException(String message, CalledMethod[] methods, String reason)
message
- Method Detail |
---|
public String getReason()
public CalledMethod[] getCalledMethods()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |