Home | History | Annotate | Download | only in runner

Lines Matching refs:Request

14  * A <code>Request</code> is an abstract description of tests to be run. Older versions of
20 * <p>The flow when JUnit runs tests is that a <code>Request</code> specifies some tests to be run -&gt;
21 * a {@link org.junit.runner.Runner} is created for each class implied by the <code>Request</code> -&gt;
27 public abstract class Request {
29 * Create a <code>Request</code> that, when processed, will run a single test.
35 * @return a <code>Request</code> that will cause a single test be run
37 public static Request method(Class<?> clazz, String methodName) {
39 return Request.aClass(clazz).filterWith(method);
43 * Create a <code>Request</code> that, when processed, will run all the tests
47 * @return a <code>Request</code> that will cause all tests in the class to be run
49 public static Request aClass(Class<?> clazz) {
54 * Create a <code>Request</code> that, when processed, will run all the tests
58 * @return a <code>Request</code> that will cause all tests in the class to be run
60 public static Request classWithoutSuiteMethod(Class<?> clazz) {
65 * Create a <code>Request</code> that, when processed, will run all the tests
70 * @return a <code>Request</code> that will cause all tests in the classes to be run
72 public static Request classes(Computer computer, Class<?>... classes) {
84 * Create a <code>Request</code> that, when processed, will run all the tests
88 * @return a <code>Request</code> that will cause all tests in the classes to be run
90 public static Request classes(Class<?>... classes) {
96 * Creates a {@link Request} that, when processed, will report an error for the given
99 public static Request errorReport(Class<?> klass, Throwable cause) {
105 * @return a <code>Request</code> that will run the given runner when invoked
107 public static Request runner(final Runner runner) {
108 return new Request() {
117 * Returns a {@link Runner} for this Request
119 * @return corresponding {@link Runner} for this Request
124 * Returns a Request that only contains those tests that should run when
127 * @param filter The {@link Filter} to apply to this Request
128 * @return the filtered Request
130 public Request filterWith(Filter filter) {
135 * Returns a Request that only runs contains tests whose {@link Description}
139 * @return the filtered Request
141 public Request filterWith(final Description desiredDescription) {
146 * Returns a Request whose Tests can be run in a certain order, defined by
160 * new JUnitCore().run(Request.aClass(AllTests.class).sortWith(forward()));
164 * @param comparator definition of the order of the tests in this Request
165 * @return a Request with ordered Tests
167 public Request sortWith(Comparator<Description> comparator) {