Package org.jmock.core
Class AbstractDynamicMock
java.lang.Object
org.jmock.core.AbstractDynamicMock
- All Implemented Interfaces:
DynamicMock
,Verifiable
- Direct Known Subclasses:
CGLIBCoreMock
,CoreMock
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractDynamicMock
(Class mockedType, String name) AbstractDynamicMock
(Class mockedType, String name, InvocationDispatcher invocationDispatcher) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInvokable
(Invokable invokable) protected Object
mockInvocation
(Invocation invocation) static String
abstract Object
proxy()
void
reset()
void
setDefaultStub
(Stub newDefaultStub) toString()
void
verify()
Throw an AssertionFailedException if any expectations have not been met.
-
Constructor Details
-
AbstractDynamicMock
-
AbstractDynamicMock
public AbstractDynamicMock(Class mockedType, String name, InvocationDispatcher invocationDispatcher)
-
-
Method Details
-
proxy
- Specified by:
proxy
in interfaceDynamicMock
-
getMockedType
- Specified by:
getMockedType
in interfaceDynamicMock
-
setDefaultStub
- Specified by:
setDefaultStub
in interfaceDynamicMock
-
addInvokable
- Specified by:
addInvokable
in interfaceDynamicMock
-
reset
public void reset()- Specified by:
reset
in interfaceDynamicMock
-
verify
public void verify()Description copied from interface:Verifiable
Throw an AssertionFailedException if any expectations have not been met. Implementations of this method must be idempotent: jMock can call this method more than once when verifying expectations at the end of a test.- Specified by:
verify
in interfaceVerifiable
-
toString
-
getMockName
-
mockNameFromClass
-
mockInvocation
- Throws:
Throwable
-