IMockObjectpublic class MockObject extends java.lang.Object implements IMockObject
| Constructor | Description |
|---|---|
MockObject(java.lang.String name,
java.lang.Class<?> type,
java.lang.Object instance,
boolean verified,
boolean global,
IDefaultResponse defaultResponse,
Specification specification) |
| Modifier and Type | Method | Description |
|---|---|---|
IDefaultResponse |
getDefaultResponse() |
Returns the default response strategy for this mock object.
|
java.lang.Object |
getInstance() |
Returns the instance of this mock object.
|
java.lang.String |
getName() |
Returns the name of this mock object, or
null if it has no name. |
Specification |
getSpecification() |
Returns the specification that this mock object is attached to.
|
java.lang.Class<?> |
getType() |
Returns the declared type of this mock object.
|
boolean |
isVerified() |
Tells whether this mock object supports verification of invocations.
|
boolean |
matches(java.lang.Object target,
IMockInteraction interaction) |
Tells whether this mock object matches the target of the specified interaction.
|
public MockObject(java.lang.String name,
java.lang.Class<?> type,
java.lang.Object instance,
boolean verified,
boolean global,
IDefaultResponse defaultResponse,
Specification specification)
public java.lang.String getName()
IMockObjectnull if it has no name.getName in interface IMockObjectnull if it has no namepublic java.lang.Class<?> getType()
IMockObjectgetType in interface IMockObjectpublic java.lang.Object getInstance()
IMockObjectgetInstance in interface IMockObjectpublic boolean isVerified()
IMockObjectisVerified in interface IMockObjectpublic IDefaultResponse getDefaultResponse()
IMockObjectgetDefaultResponse in interface IMockObjectpublic Specification getSpecification()
IMockObjectgetSpecification in interface IMockObjectpublic boolean matches(java.lang.Object target,
IMockInteraction interaction)
IMockObjectmatches in interface IMockObjecttarget - the target of the interactioninteraction - an interactionCopyright © 2018. All rights reserved