public class ParameterisedTestClassRunner extends Object
| Constructor and Description |
|---|
ParameterisedTestClassRunner(org.junit.runners.model.TestClass testClass)
Creates a runner for a given test class.
|
| Modifier and Type | Method and Description |
|---|---|
List<org.junit.runners.model.FrameworkMethod> |
computeFrameworkMethods()
Returns a list of
FrameworkMethods. |
org.junit.runner.Description |
describeParameterisedMethod(org.junit.runners.model.FrameworkMethod method)
Returns description of a parameterised method.
|
org.junit.runner.Description |
getDescriptionFor(org.junit.runners.model.FrameworkMethod method)
Returns description of parametrized method for given set of parameters (considering test name convention
given with @
TestCaseName). |
org.junit.runners.model.Statement |
parameterisedMethodInvoker(org.junit.runners.model.FrameworkMethod method,
Object testClass)
Returns a InvokeParameterisedMethod for parameterised methods and null
for nonparameterised
|
List<org.junit.runners.model.FrameworkMethod> |
returnListOfMethods()
Returns a list of
FrameworkMethods - once per method, like
there were no parameters. |
void |
runParameterisedTest(TestMethod method,
org.junit.runners.model.Statement methodInvoker,
org.junit.runner.notification.RunNotifier notifier)
Executes parameterised method.
|
boolean |
shouldRun(TestMethod testMethod)
Tells if method should be run by this runner.
|
TestMethod |
testMethodFor(org.junit.runners.model.FrameworkMethod method)
Returns a cached TestMethod object related to the given FrameworkMethod.
|
public ParameterisedTestClassRunner(org.junit.runners.model.TestClass testClass)
testClass - public List<org.junit.runners.model.FrameworkMethod> computeFrameworkMethods()
FrameworkMethods. Handles both
parameterised methods (counts them as many times as many paramsets they
have) and nonparameterised methods (just counts them once).public List<org.junit.runners.model.FrameworkMethod> returnListOfMethods()
FrameworkMethods - once per method, like
there were no parameters.
For JUnit to build names for IDE.public org.junit.runners.model.Statement parameterisedMethodInvoker(org.junit.runners.model.FrameworkMethod method,
Object testClass)
method - Test methodtestClass - public boolean shouldRun(TestMethod testMethod)
testMethod - public void runParameterisedTest(TestMethod method, org.junit.runners.model.Statement methodInvoker, org.junit.runner.notification.RunNotifier notifier)
method - methodInvoker - notifier - public org.junit.runner.Description describeParameterisedMethod(org.junit.runners.model.FrameworkMethod method)
method - TODOpublic TestMethod testMethodFor(org.junit.runners.model.FrameworkMethod method)
method - public org.junit.runner.Description getDescriptionFor(org.junit.runners.model.FrameworkMethod method)
TestCaseName). If method is not parametrized or runner has not been created yet
returns null.method - Copyright © 2017 Pragmatists. All rights reserved.