shivadorepally / junitparams

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

Using @Rule in test causes "Cannot find invoker for the parameterised method. Using wrong JUnit version?" #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have a test that uses the following rule :
    @Rule
    public TemporaryFolder folder = new TemporaryFolder();

JunitParams throws the following RuntimeException :

Cannot find invoker for the parameterised method. Using wrong JUnit version?
at 
junitparams.ParameterisedTestMethodRunner.findParameterisedMethodInvokerInChain
    (ParameterisedTestMethodRunner.java:214)

The methodInvoker statement passed into the failing method is an instance 
org.junit.rules.ExternalResource

Original issue reported on code.google.com by ravan.na...@gmail.com on 10 Jun 2011 at 9:33

GoogleCodeExporter commented 8 years ago

What version of the product are you using? On what operating system?

I'm using version 0.3.0 of JUnitParams.

Original comment by ravan.na...@gmail.com on 10 Jun 2011 at 9:38

GoogleCodeExporter commented 8 years ago
Ugly but works now. The problem is, I need to find a specific methodInvoker, 
and the only way is by reflection. ExternalResource is a special case.

Original comment by lipinski...@gmail.com on 13 Jun 2011 at 3:40