Package org.jmock.core

# Class AbstractDynamicMock

java.lang.Object
org.jmock.core.AbstractDynamicMock

All Implemented Interfaces:
  `DynamicMock`, `Verifiable`

Direct Known Subclasses:
  `CoreMock`

public abstract class AbstractDynamicMock extends Object implements DynamicMock

## Constructor Summary

Constructors
Constructor
Description
`AbstractDynamicMock(Class mockedType, String name)`
`AbstractDynamicMock(Class mockedType, String name, InvocationDispatcher invocationDispatcher)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addInvokable(Invokable invokable)`
`Class`
`getMockedType()`
`String`
`getMockName()`
`protected Object`
`mockInvocation(Invocation invocation)`
`static String`
`mockNameFromClass(Class c)`
`abstract Object`
`proxy()`
`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`

## Constructor Details

### AbstractDynamicMock

public AbstractDynamicMock(Class mockedType, String name)

### AbstractDynamicMock

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

## Method Details

### proxy

public abstract Object proxy()

Specified by:
  `proxy` in interface `DynamicMock`

### getMockedType

public Class getMockedType()

Specified by:
  `getMockedType` in interface `DynamicMock`

### 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`

### 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 interface `Verifiable`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### getMockName

public String getMockName()

### mockNameFromClass

public static String mockNameFromClass(Class c)

### mockInvocation

protected Object mockInvocation(Invocation invocation) throws Throwable

Throws:
  `Throwable`