public class MockObject extends java.lang.Object implements IMockObject
Constructor and 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 and 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()
IMockObject
null
if it has no name.getName
in interface IMockObject
null
if it has no namepublic java.lang.Class<?> getType()
IMockObject
getType
in interface IMockObject
public java.lang.Object getInstance()
IMockObject
getInstance
in interface IMockObject
public boolean isVerified()
IMockObject
isVerified
in interface IMockObject
public IDefaultResponse getDefaultResponse()
IMockObject
getDefaultResponse
in interface IMockObject
public Specification getSpecification()
IMockObject
getSpecification
in interface IMockObject
public boolean matches(java.lang.Object target, IMockInteraction interaction)
IMockObject
matches
in interface IMockObject
target
- the target of the interactioninteraction
- an interactionCopyright © 2016. All rights reserved