Skip to content

Commit

Permalink
Add MockMethodInvocation Constructor
Browse files Browse the repository at this point in the history
Issue gh-9401
  • Loading branch information
jzheaux committed Aug 25, 2022
1 parent 27ce593 commit 6fd23d2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ public MockMethodInvocation(Object targetObject, Class clazz, String methodName,

public MockMethodInvocation(Object targetObject, Class clazz, String methodName, Class... parameterTypes)
throws NoSuchMethodException {
this.method = clazz.getMethod(methodName, parameterTypes);
this(targetObject, clazz.getMethod(methodName, parameterTypes));
this.targetObject = targetObject;
}

public MockMethodInvocation(Object targetObject, Method method) {
this.targetObject = targetObject;
this.method = method;
}

@Override
public Object[] getArguments() {
return this.arguments;
Expand Down

0 comments on commit 6fd23d2

Please sign in to comment.