1package org.junit.experimental.runners; 2 3import org.junit.runners.Suite; 4import org.junit.runners.model.RunnerBuilder; 5 6 7/** 8 * If you put tests in inner classes, Ant, for example, won't find them. By running the outer class 9 * with Enclosed, the tests in the inner classes will be run. You might put tests in inner classes 10 * to group them for convenience or to share constants. 11 * 12 * So, for example: 13 * <pre> 14 * \@RunWith(Enclosed.class) 15 * public class ListTests { 16 * ...useful shared stuff... 17 * public static class OneKindOfListTest {...} 18 * public static class AnotherKind {...} 19 * } 20 * </pre> 21 * 22 * For a real example, @see org.junit.tests.manipulation.SortableTest. 23 */ 24public class Enclosed extends Suite { 25 /** 26 * Only called reflectively. Do not use programmatically. 27 */ 28 public Enclosed(Class<?> klass, RunnerBuilder builder) throws Throwable { 29 super(builder, klass, klass.getClasses()); 30 } 31} 32