org.jmock
Class Mock
java.lang.Object
org.jmock.Mock
- All Implemented Interfaces:
- BuilderNamespace, DynamicMock, Verifiable
public class Mock
- extends Object
- implements DynamicMock, BuilderNamespace
- Since:
- 1.0
Mock
public Mock(Class mockedType)
Mock
public Mock(Class mockedType,
String name)
Mock
public Mock(DynamicMock coreMock)
getMockedType
public Class getMockedType()
- Specified by:
getMockedType
in interface DynamicMock
proxy
public Object proxy()
- Specified by:
proxy
in interface DynamicMock
toString
public String toString()
- Overrides:
toString
in class Object
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
addInvokable
public void addInvokable(Invokable invokable)
- Specified by:
addInvokable
in interface DynamicMock
stubs
public NameMatchBuilder stubs()
expects
public NameMatchBuilder expects(InvocationMatcher expectation)
setDefaultStub
public void setDefaultStub(Stub newDefaultStub)
- Specified by:
setDefaultStub
in interface DynamicMock
reset
public void reset()
- Specified by:
reset
in interface DynamicMock
lookupID
public MatchBuilder lookupID(String id)
- Specified by:
lookupID
in interface BuilderNamespace
registerUniqueID
public void registerUniqueID(String id,
MatchBuilder builder)
- Specified by:
registerUniqueID
in interface BuilderNamespace
registerMethodName
public void registerMethodName(String id,
MatchBuilder builder)
- Specified by:
registerMethodName
in interface BuilderNamespace