Willam2004 / powermock

Automatically exported from code.google.com/p/powermock
Apache License 2.0
0 stars 0 forks source link

Unable to verifyPrivate a method : maybe a bug in the withArguments method #534

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. PowerMockito.verifyPrivate(obj, times (x)).invoke (Method).withArguments(a, 
b)
2. Have more than one argument in withArguments
3. VerificationArguments.withArguments will make a 
method.invoke(objectToVerify, firstArgument, additionalArguments) : 
firstArgument has the correct class, but additionalArguments is always a 
Object[].

What is the expected output? What do you see instead?
I expect the method to call invoke with the correct set of arguments, instead i 
get an illegalargumentexception

What version of the product are you using? On what operating system?
powermock api mockito 1.4.9, arch linux

Please provide any additional information below.
I suspect a really small bug in the withArguments method. If the line of code 
was method.invoke(objectToVerify, allArguments);, it would have worked.

Original issue reported on code.google.com by lionel.b...@gmail.com on 17 Dec 2014 at 10:57