JUnit @Rule to pass parameter to test
- by 01
I'd like to create rule to be able to do something like this
@Test
public void testValidationDefault(int i) throws Throwable {..}
Where i is parameter passed to the test by @Rule.
However I do get
java.lang.Exception: Method testValidationDefault should have no parameters
is there any way to bypass it and set the i parameter in the @Rule?