public class InnerTestClassesSuite
extends org.junit.runners.Suite
@RunWith(InnerTestClassesSuite.class)
.
In contrast to the Enclosed
runner provided by
JUnit,
it detects if an inner class is actually a test class
and ignores all other inner classes.
Example:@RunWith(InnerTestClassesSuite.class) public class LoginBeanTests { public static class UnitTests { @Test public void test1() { ... } } @Configuration public static class IntegrationTestsConfig { ... } @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = IntegrationTestsConfig.class) public static class IntegrationTests { @Test public void test2() { ... } } }
Constructor and Description |
---|
InnerTestClassesSuite(Class<?> klass,
org.junit.runners.model.RunnerBuilder runnerBuilder) |
describeChild, emptySuite, getChildren, runChild
childrenInvoker, classBlock, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, isIgnored, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses
public InnerTestClassesSuite(Class<?> klass, org.junit.runners.model.RunnerBuilder runnerBuilder) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
Copyright © 2017. All rights reserved.