EdwinLi / powermock

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

ConstructorNotFoundException on whenNew wirh array #267

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. See attached code for lots of details
2. Short version: whenNew on class that has a constructor with parameters as: 
(AnyClass any, OtherClass... arrayOfClasses); goes into 
ConstructorNotFoundException

What is the expected output? What do you see instead?
The tests should pass, since there is not even a verify or assert. But the 
tests fail because of ConstructorNotFoundException

What version of the product are you using? On what operating system?
Using powermock-mockito-junit-1.3.9, Windows XP

Please provide any additional information below.
Having a constructor as: (OtherClass... arrayOfClasses) works as expected

Original issue reported on code.google.com by Alexandr...@gmail.com on 16 Jul 2010 at 1:58

Attachments:

GoogleCodeExporter commented 9 years ago
See 
http://code.google.com/p/powermock/source/browse/trunk/modules/module-test/power
mockito/junit4/src/test/java/samples/powermockito/junit4/constructor/InnerConstr
uctorsAreFoundTest.java in trunk for an example. Thanks for reporting.

Original comment by johan.ha...@gmail.com on 21 Jul 2010 at 5:39