类 JUnit4
- 所有已实现的接口:
Describable
,Filterable
,Sortable
public final class JUnit4 extends BlockJUnit4ClassRunner
Aliases the current default JUnit 4 class runner, for future-proofing. If future versions of JUnit change the default Runner class, they will also change the definition of this class. Developers wanting to explicitly tag a class as a JUnit 4 class should use@RunWith(JUnit4.class)
, not, for example in JUnit 4.5,@RunWith(BlockJUnit4ClassRunner.class)
. This is the only way this class should be used--any extension that depends on the implementation details of this class is likely to break in future versions.- 从以下版本开始:
- 4.5
方法概要
从类继承的方法 org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
从类继承的方法 org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses
构造器详细资料
JUnit4
public JUnit4(Class<?> klass) throws InitializationError
Constructs a new instance of the default runner