carbidecpp22devenv/plugins/org.eclipse.test.source_3.5.0.r20080925/src/org.junit4_4.5.0.v20090423/junitsrc/org/junit/runner/RunWith.java
changeset 636 3ef299ba838f
equal deleted inserted replaced
635:8d56403172bc 636:3ef299ba838f
       
     1 package org.junit.runner;
       
     2 
       
     3 import java.lang.annotation.ElementType;
       
     4 import java.lang.annotation.Inherited;
       
     5 import java.lang.annotation.Retention;
       
     6 import java.lang.annotation.RetentionPolicy;
       
     7 import java.lang.annotation.Target;
       
     8 
       
     9 /**
       
    10  * When a class is annotated with <code>&#064;RunWith</code> or extends a class annotated 
       
    11  * with <code>&#064;RunWith</code>, JUnit will invoke the class it references to run the 
       
    12  * tests in that class instead of the runner built into JUnit. We added this feature late 
       
    13  * in development. While it seems powerful we expect the runner API to change as we learn 
       
    14  * how people really use it. Some of the classes that are currently internal will likely 
       
    15  * be refined and become public.
       
    16  * 
       
    17  * For example, suites in JUnit 4 are built using RunWith, and a custom runner named Suite:
       
    18  * 
       
    19  * <pre>
       
    20  * &#064;RunWith(Suite.class)
       
    21  * &#064;SuiteClasses(ATest.class, BTest.class, CTest.class)
       
    22  * public class ABCSuite {
       
    23  * }
       
    24  * </pre>
       
    25  */
       
    26 @Retention(RetentionPolicy.RUNTIME)
       
    27 @Target(ElementType.TYPE)
       
    28 @Inherited
       
    29 public @interface RunWith {
       
    30 	/**
       
    31 	 * @return a Runner class (must have a constructor that takes a single Class to run)
       
    32 	 */
       
    33 	Class<? extends Runner> value();
       
    34 }