Package org.mockito.internal.util
Class DefaultMockingDetails
- java.lang.Object
-
- org.mockito.internal.util.DefaultMockingDetails
-
- All Implemented Interfaces:
MockingDetails
public class DefaultMockingDetails extends java.lang.Object implements MockingDetails
Class to inspect any object, and identify whether a particular object is either a mock or a spy. This is a wrapper forMockUtil
.
-
-
Constructor Summary
Constructors Constructor Description DefaultMockingDetails(java.lang.Object toInspect, MockUtil delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<Invocation>
getInvocations()
Provides a collection of methods indicating the invocations of the objectboolean
isMock()
Find out whether the object is a mock.boolean
isSpy()
Find out whether the object is a spy.
-
-
-
Constructor Detail
-
DefaultMockingDetails
public DefaultMockingDetails(java.lang.Object toInspect, MockUtil delegate)
-
-
Method Detail
-
isMock
public boolean isMock()
Find out whether the object is a mock.- Specified by:
isMock
in interfaceMockingDetails
- Returns:
- true if the object is a mock or a spy.
-
isSpy
public boolean isSpy()
Find out whether the object is a spy.- Specified by:
isSpy
in interfaceMockingDetails
- Returns:
- true if the object is a spy.
-
getInvocations
public java.util.Collection<Invocation> getInvocations()
Description copied from interface:MockingDetails
Provides a collection of methods indicating the invocations of the object- Specified by:
getInvocations
in interfaceMockingDetails
- Returns:
- collection of Invocation representing the invocations for the object.
-
-