org.jmock

Class Mock

Implemented Interfaces:
BuilderNamespace, DynamicMock, Verifiable
Known Direct Subclasses:
Mock

public class Mock
extends Object
implements DynamicMock, BuilderNamespace, Verifiable

Constructor Summary

Mock(Class mockedType)
Mock(Class mockedType, String name)
Mock(DynamicMock coreMock)

Method Summary

void
addInvokable(Invokable invokable)
NameMatchBuilder
expects(InvocationMatcher expectation)
Class
getMockedType()
MatchBuilder
lookupID(String id)
Object
proxy()
void
registerMethodName(String id, MatchBuilder builder)
void
registerUniqueID(String id, MatchBuilder builder)
void
reset()
void
setDefaultStub(Stub newDefaultStub)
NameMatchBuilder
stubs()
String
toString()
void
verify()

Constructor Details

Mock

public Mock(Class mockedType)

Mock

public Mock(Class mockedType,
            String name)

Mock

public Mock(DynamicMock coreMock)

Method Details

addInvokable

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

expects

public NameMatchBuilder expects(InvocationMatcher expectation)

getMockedType

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

lookupID

public MatchBuilder lookupID(String id)
Specified by:
lookupID in interface BuilderNamespace

proxy

public Object proxy()
Specified by:
proxy in interface DynamicMock

registerMethodName

public void registerMethodName(String id,
                               MatchBuilder builder)
Specified by:
registerMethodName in interface BuilderNamespace

registerUniqueID

public void registerUniqueID(String id,
                             MatchBuilder builder)
Specified by:
registerUniqueID in interface BuilderNamespace

reset

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

setDefaultStub

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

stubs

public NameMatchBuilder stubs()

toString

public String toString()

verify

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