Package org.spockframework.mock.runtime
Class MockInvocation
java.lang.Object
org.spockframework.mock.runtime.MockInvocation
- All Implemented Interfaces:
IMockInvocation
- Author:
- Peter Niederwieser
-
Constructor Summary
ConstructorsConstructorDescriptionMockInvocation
(IMockObject mockObject, IMockMethod method, List<Object> arguments, IResponseGenerator realMethodInvoker) -
Method Summary
Modifier and TypeMethodDescriptionDelegates this method invocation to the real object underlying this mock object, including any method arguments.callRealMethodWithArgs
(Object... arguments) Delegates this method invocation to the real object underlying this mock object, replacing the original method arguments with the specified arguments.boolean
The arguments for the invocation.The invoked method.The mock object that received the invocation.int
hashCode()
toString()
-
Constructor Details
-
MockInvocation
public MockInvocation(IMockObject mockObject, IMockMethod method, List<Object> arguments, IResponseGenerator realMethodInvoker)
-
-
Method Details
-
getMockObject
Description copied from interface:IMockInvocation
The mock object that received the invocation.- Specified by:
getMockObject
in interfaceIMockInvocation
-
getMethod
Description copied from interface:IMockInvocation
The invoked method.- Specified by:
getMethod
in interfaceIMockInvocation
-
getArguments
Description copied from interface:IMockInvocation
The arguments for the invocation.- Specified by:
getArguments
in interfaceIMockInvocation
-
callRealMethod
Description copied from interface:IMockInvocation
Delegates this method invocation to the real object underlying this mock object, including any method arguments. If this mock object has no underlying real object, aCannotInvokeRealMethodException
is thrown.- Specified by:
callRealMethod
in interfaceIMockInvocation
- Returns:
- the return value of the method to which this invocation was delegated
-
callRealMethodWithArgs
Description copied from interface:IMockInvocation
Delegates this method invocation to the real object underlying this mock object, replacing the original method arguments with the specified arguments. If this mock object has no underlying real object, aCannotInvokeRealMethodException
is thrown.- Specified by:
callRealMethodWithArgs
in interfaceIMockInvocation
- Returns:
- the return value of the method to which this invocation was delegated
-
toString
-
equals
-
hashCode
public int hashCode()
-