001 package org.junit.runner; 002 003 import java.lang.annotation.ElementType; 004 import java.lang.annotation.Inherited; 005 import java.lang.annotation.Retention; 006 import java.lang.annotation.RetentionPolicy; 007 import java.lang.annotation.Target; 008 009 import org.junit.runner.manipulation.Ordering; 010 011 /** 012 * When a test class is annotated with <code>@OrderWith</code> or extends a class annotated 013 * with <code>@OrderWith</code>, JUnit will order the tests in the test class (and child 014 * test classes, if any) using the ordering defined by the {@link Ordering} class. 015 * 016 * @since 4.13 017 */ 018 @Retention(RetentionPolicy.RUNTIME) 019 @Target(ElementType.TYPE) 020 @Inherited 021 public @interface OrderWith { 022 /** 023 * Gets a class that extends {@link Ordering}. The class must have a public no-arg constructor. 024 */ 025 Class<? extends Ordering.Factory> value(); 026 }