|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
net.grinder.testutility.CallRecorder
public class CallRecorder
Utility class used to record and assert method invocations.
| Nested Class Summary | |
|---|---|
static interface |
CallRecorder.MethodFilter
|
| Constructor Summary | |
|---|---|
CallRecorder()
|
|
| Method Summary | |
|---|---|
CallData |
assertException(String methodName,
Class<?> throwableType,
Class<?>... parameterTypes)
|
CallData |
assertException(String methodName,
Class<?> throwableType,
Object... parameters)
Check the given method was called, and that it threw an exception of the given type. |
CallData |
assertException(String methodName,
Throwable throwable,
Class<?>... parameterTypes)
|
CallData |
assertException(String methodName,
Throwable throwable,
Object... parameters)
Check the given method was called, and that it threw the given exception. |
void |
assertNoMoreCalls()
Check that no methods have been called. |
CallData |
assertSuccess(String methodName,
Class<?>... parameterTypes)
|
CallData |
assertSuccess(String methodName,
Object... parameters)
|
String |
getCallHistory()
|
CallData |
peekFirst()
|
void |
record(CallData callData)
|
void |
resetCallHistory()
Reset the call data. |
void |
setIgnoreCallOrder(boolean b)
|
void |
setIgnoreMethod(String methodName)
|
void |
setIgnoreObjectMethods()
|
void |
waitUntilCalled(int timeout)
Wait until we're called. |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CallRecorder()
| Method Detail |
|---|
public final void resetCallHistory()
public void waitUntilCalled(int timeout)
timeout
milliseconds.
timeout - Maximum time in milliseconds to wait for.public String getCallHistory()
public CallData peekFirst()
public final void assertNoMoreCalls()
public void setIgnoreCallOrder(boolean b)
public void setIgnoreObjectMethods()
public void setIgnoreMethod(String methodName)
public final void record(CallData callData)
public final CallData assertSuccess(String methodName,
Object... parameters)
assertSuccess in interface CallAssertions
public final CallData assertSuccess(String methodName,
Class<?>... parameterTypes)
assertSuccess in interface CallAssertions
public final CallData assertException(String methodName,
Throwable throwable,
Object... parameters)
CallAssertions
assertException in interface CallAssertions
public final CallData assertException(String methodName,
Throwable throwable,
Class<?>... parameterTypes)
assertException in interface CallAssertions
public final CallData assertException(String methodName,
Class<?> throwableType,
Object... parameters)
CallAssertions
assertException in interface CallAssertions
public final CallData assertException(String methodName,
Class<?> throwableType,
Class<?>... parameterTypes)
assertException in interface CallAssertions
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||