|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.mockachino.MockData<T>
public class MockData<T>
Constructor Summary | |
---|---|
MockData(java.lang.Class<T> iface,
java.lang.reflect.Type type,
java.util.Set<java.lang.Class<?>> extraInterfaces,
java.lang.String name)
|
Method Summary | |
---|---|
Invocation |
addCall(java.lang.Object obj,
MockachinoMethod method,
java.lang.Object[] args,
java.lang.StackTraceElement[] stackTrace)
Add a call on the mock. |
void |
deleteLastInvocation()
|
java.lang.Iterable<Invocation> |
getCalls(MockPoint start,
MockPoint end)
Gets a list of all the method invocations made for the mock object between (inclusive) two points in time. |
java.util.Set<java.lang.Class<?>> |
getExtraInterfaces()
Get the set of additionally implemented interfaces by the mock. |
java.lang.Class<T> |
getInterface()
Get the interface of the mock |
java.lang.Iterable<Invocation> |
getInvocations()
Gets a list of all the method invocations made for the mock object |
java.util.Set<MockachinoMethod> |
getMethods()
|
java.lang.String |
getName()
|
java.util.List<MethodObserver> |
getObservers(MockachinoMethod method)
Get all observers hooked to a specific method on the mock |
MethodStubs |
getStubs(MockachinoMethod method)
Get all stubs for the mock and the method |
java.lang.reflect.Type |
getTypeLiteral()
|
void |
resetCalls()
Clear the list of invocations |
void |
resetObservers()
Remove all observers from the mock |
void |
resetStubs()
Remove all stubbing on the mock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockData(java.lang.Class<T> iface, java.lang.reflect.Type type, java.util.Set<java.lang.Class<?>> extraInterfaces, java.lang.String name)
Method Detail |
---|
public java.lang.String getName()
public java.util.Set<MockachinoMethod> getMethods()
public java.lang.Iterable<Invocation> getInvocations()
public java.lang.Iterable<Invocation> getCalls(MockPoint start, MockPoint end)
public MethodStubs getStubs(MockachinoMethod method)
method
-
public java.util.List<MethodObserver> getObservers(MockachinoMethod method)
method
-
public java.lang.Class<T> getInterface()
public Invocation addCall(java.lang.Object obj, MockachinoMethod method, java.lang.Object[] args, java.lang.StackTraceElement[] stackTrace)
method
- args
- stackTrace
-
public void resetCalls()
public void resetStubs()
public void resetObservers()
public java.util.Set<java.lang.Class<?>> getExtraInterfaces()
public void deleteLastInvocation()
public java.lang.reflect.Type getTypeLiteral()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |