org.jmock.core
Class AbstractDynamicMock

java.lang.Object
  extended by org.jmock.core.AbstractDynamicMock
All Implemented Interfaces:
DynamicMock, Verifiable
Direct Known 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)
           
 Class getMockedType()
           
 String getMockName()
           
protected  Object mockInvocation(Invocation invocation)
           
static String mockNameFromClass(Class c)
           
 void reset()
           
 void setDefaultStub(Stub newDefaultStub)
           
 String toString()
           
 void verify()
          Throw an AssertionFailedException if any expectations have not been met.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jmock.core.DynamicMock
proxy
 

Constructor Detail

AbstractDynamicMock

public AbstractDynamicMock(Class mockedType,
                           String name)

AbstractDynamicMock

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

getMockedType

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

mockInvocation

protected Object mockInvocation(Invocation invocation)
                         throws Throwable
Throws:
Throwable

verify

public void verify()
Description copied from interface: Verifiable
Throw an AssertionFailedException if any expectations have not been met.

Specified by:
verify in interface Verifiable

toString

public String toString()
Overrides:
toString in class Object

getMockName

public String getMockName()

setDefaultStub

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

addInvokable

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

reset

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

mockNameFromClass

public static String mockNameFromClass(Class c)