类 Enclosed
- java.lang.Object
- org.junit.runner.Runner
- org.junit.runners.ParentRunner<Runner>
- org.junit.runners.Suite
- org.junit.experimental.runners.Enclosed
- 所有已实现的接口:
Describable
,Filterable
,Sortable
public class Enclosed extends Suite
If you put tests in inner classes, Ant, for example, won't find them. By running the outer class with Enclosed, the tests in the inner classes will be run. You might put tests in inner classes to group them for convenience or to share constants. Abstract inner classes are ignored.So, for example:
@RunWith(Enclosed.class) public class ListTests { ...useful shared stuff... public static class OneKindOfListTest {...} public static class AnotherKind {...} abstract public static class Ignored {...} }
嵌套类概要
从类继承的嵌套类/接口 org.junit.runners.Suite
Suite.SuiteClasses
构造器概要
构造器 构造器 说明 Enclosed(Class<?> klass, RunnerBuilder builder)
Only called reflectively.
方法概要
从类继承的方法 org.junit.runners.Suite
describeChild, emptySuite, getChildren, runChild
从类继承的方法 org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, isIgnored, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses
构造器详细资料
Enclosed
public Enclosed(Class<?> klass, RunnerBuilder builder) throws Throwable
Only called reflectively. Do not use programmatically.- 抛出:
Throwable