What steps will reproduce the problem?
1.Create a test class (MyTest.java) that inherits another one
(MyAbstractTestClass.java)
2.On MyTest.java add the annotations @RunWith(PowerMockRunner.class)and
@PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
3.Create a test method in MyTest.java (the method may be empty)
4.Run the test
What is the expected output? What do you see instead?
The expected output is a successfull run, but instead it fails with an
Exception : java.lang.IllegalArgumentException: Test class can only have one
constructor
What version of the product are you using? On what operating system?
PowerMock 1.6.0
Mockito 1.10.8
Junit 4.11
Spring 3.1.4
Windows 7 64bits
Please provide any additional information below.
When a testClass inherits another one PowerMock adds a new constructor that
takes a IndicateReloadClass as parameter. But when we try to instanciate a new
SpringJUnit4ClassRunner, which extends org.junit.runners.ParentRunner, it tries
to build a new MyTest, which now has 2 constructors and fails.
Original issue reported on code.google.com by Alex.bel...@gmail.com on 4 Dec 2014 at 9:33
Original issue reported on code.google.com by
Alex.bel...@gmail.com
on 4 Dec 2014 at 9:33Attachments: