|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.flex.TestCmsFlexResponse.RecordingMock
public static class TestCmsFlexResponse.RecordingMock
An InvocationHandler which simply records the arguments for each method that was called.
If a 'stub' object was passed in the contructor, and the stub object has a method of the same signature as the one that is being called, that method will be invoked.
Constructor Summary | |
---|---|
TestCmsFlexResponse.RecordingMock()
Default empty construtor. |
|
TestCmsFlexResponse.RecordingMock(Object stub)
Construtor with a 'stub' Object. |
Method Summary | |
---|---|
List |
getCalls(Method method)
Returns a list of all recorded calls to the given method. |
Object |
invoke(Object proxy,
Method method,
Object[] args)
Notice that the given method has been invoked. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TestCmsFlexResponse.RecordingMock()
public TestCmsFlexResponse.RecordingMock(Object stub)
stub
- the stub Object to useMethod Detail |
---|
public List getCalls(Method method)
method
- the method to get the recorded calls for
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
Two actions are taken:
getCalls(method)
.m_stub
is not null, the requested method is invoked on it
invoke
in interface InvocationHandler
Throwable
InvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |