|
|
|
@ -38,10 +38,15 @@ public class MockMethodInvocation implements MethodInvocation { |
|
|
|
|
|
|
|
|
|
|
|
public MockMethodInvocation(Object targetObject, Class clazz, String methodName, Class... parameterTypes) |
|
|
|
public MockMethodInvocation(Object targetObject, Class clazz, String methodName, Class... parameterTypes) |
|
|
|
throws NoSuchMethodException { |
|
|
|
throws NoSuchMethodException { |
|
|
|
this.method = clazz.getMethod(methodName, parameterTypes); |
|
|
|
this(targetObject, clazz.getMethod(methodName, parameterTypes)); |
|
|
|
this.targetObject = targetObject; |
|
|
|
this.targetObject = targetObject; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public MockMethodInvocation(Object targetObject, Method method) { |
|
|
|
|
|
|
|
this.targetObject = targetObject; |
|
|
|
|
|
|
|
this.method = method; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Object[] getArguments() { |
|
|
|
public Object[] getArguments() { |
|
|
|
return this.arguments; |
|
|
|
return this.arguments; |
|
|
|
|