org.jmock.core

Class AbstractDynamicMock

Implemented Interfaces:
DynamicMock, Verifiable
Known Direct Subclasses:
CGLIBCoreMock, CoreMock

public abstract class AbstractDynamicMock
extends Object
implements DynamicMock

Constructor Summary

AbstractDynamicMock(Class mockedType, String name)
AbstractDynamicMock(Class mockedType, String name, InvocationDispatcher invocationDispatcher)

Method Summary

void
addInvokable(Invokable invokable)
String
getMockName()
Class
getMockedType()
protected Object
mockInvocation(Invocation invocation)
static String
mockNameFromClass(Class c)
void
reset()
void
setDefaultStub(Stub newDefaultStub)
String
toString()
void
verify()

Constructor Details

AbstractDynamicMock

public AbstractDynamicMock(Class mockedType,
                           String name)

AbstractDynamicMock

public AbstractDynamicMock(Class mockedType,
                           String name,
                           InvocationDispatcher invocationDispatcher)

Method Details

addInvokable

public void addInvokable(Invokable invokable)
Specified by:
addInvokable in interface DynamicMock

getMockName

public String getMockName()

getMockedType

public Class getMockedType()
Specified by:
getMockedType in interface DynamicMock

mockInvocation

protected Object mockInvocation(Invocation invocation)
            throws Throwable

mockNameFromClass

public static String mockNameFromClass(Class c)

reset

public void reset()
Specified by:
reset in interface DynamicMock

setDefaultStub

public void setDefaultStub(Stub newDefaultStub)
Specified by:
setDefaultStub in interface DynamicMock

toString

public String toString()

verify

public void verify()
Specified by:
verify in interface Verifiable