TNG / junit-dataprovider

A TestNG like dataprovider runner for JUnit with many additional features
Apache License 2.0
246 stars 164 forks source link

should have no parameters #12

Closed neojoda closed 10 years ago

neojoda commented 11 years ago

I am getting this error when running the dataprovider:

java.lang.Exception: Method checkValidSNumber_SNumberIsNotValid_returnFalse should have no parameters

I am trying to run it on a grails project.

Test class:

package utils

import org.junit.Before import org.junit.runner.RunWith import com.tngtech.java.junit.dataprovider.DataProvider import com.tngtech.java.junit.dataprovider.DataProviderRunner import com.tngtech.java.junit.dataprovider.UseDataProvider

/**

}

neojoda commented 11 years ago

Using JUnit 4.10

neojoda commented 11 years ago

I am using grails 2.0.3 It seems that I use eclipse Run as -> Junit Test is working properly, but no when I run grails test-app. It is where I am getting the error.

Thanks for this incredible plugin!

aaschmid commented 10 years ago

Hi @neojoda,

sorry for the long delay ... unfortunately, this was no problem within the junit-dataprovider. Though, Grails uses a special test runner, see GRAILS-6352. This issue is fixed in version 2.3.:

In order to support alternate JUnit4 test runners, Grails 2.3 no longer uses a special test runner to run tests [...].

(from http://grails.org/doc/2.3.1/guide/single.html#upgradingFromPreviousVersionsOfGrails, section "Dependency Injection for Integration Tests")

Cheers, Andreas