protected class Parameterized.TestClassRunnerForParameters extends BlockJUnit4ClassRunner
Modifier | Constructor and Description |
---|---|
protected |
Parameterized.TestClassRunnerForParameters(Class<?> type,
String pattern,
int index,
Object[] parameters) |
Modifier and Type | Method and Description |
---|---|
protected Statement |
classBlock(RunNotifier notifier)
Constructs a
Statement to run all of the tests in the test class. |
Object |
createTest()
Returns a new fixture for running a test.
|
protected String |
getName()
Returns a name used to describe this Runner
|
protected Annotation[] |
getRunnerAnnotations() |
protected String |
nameFor(String pattern,
int index,
Object[] parameters) |
protected String |
testName(FrameworkMethod method)
Returns the name that describes
method for Description s. |
protected void |
validateConstructor(List<Throwable> errors)
Adds to
errors if the test class has more than one constructor,
or if the constructor takes parameters. |
protected void |
validateFields(List<Throwable> errors) |
collectInitializationErrors, computeTestMethods, describeChild, getChildren, getTestRules, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, runChild, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
childrenInvoker, classRules, filter, getDescription, getTestClass, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses
protected Parameterized.TestClassRunnerForParameters(Class<?> type, String pattern, int index, Object[] parameters) throws InitializationError
InitializationError
public Object createTest() throws Exception
BlockJUnit4ClassRunner
createTest
in class BlockJUnit4ClassRunner
Exception
protected String getName()
ParentRunner
getName
in class ParentRunner<FrameworkMethod>
protected String testName(FrameworkMethod method)
BlockJUnit4ClassRunner
method
for Description
s.
Default implementation is the method's nametestName
in class BlockJUnit4ClassRunner
protected void validateConstructor(List<Throwable> errors)
BlockJUnit4ClassRunner
errors
if the test class has more than one constructor,
or if the constructor takes parameters. Override if a subclass requires
different validation rules.validateConstructor
in class BlockJUnit4ClassRunner
protected void validateFields(List<Throwable> errors)
validateFields
in class BlockJUnit4ClassRunner
protected Statement classBlock(RunNotifier notifier)
ParentRunner
Statement
to run all of the tests in the test class. Override to add pre-/post-processing.
Here is an outline of the implementation:
ParentRunner.runChild(Object, RunNotifier)
on each object returned by ParentRunner.getChildren()
(subject to any imposed filter and sort).@BeforeClass
methods on this class
and superclasses before the previous step; if any throws an
Exception, stop execution and pass the exception on.
@AfterClass
methods on this class
and superclasses before any of the previous steps; all AfterClass methods are
always executed: exceptions thrown by previous steps are combined, if
necessary, with exceptions from AfterClass methods into a
MultipleFailureException
.
classBlock
in class ParentRunner<FrameworkMethod>
Statement
protected Annotation[] getRunnerAnnotations()
getRunnerAnnotations
in class ParentRunner<FrameworkMethod>
Copyright © 2002-2012 JUnit. All Rights Reserved.