KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > junit > internal > requests > ClassesRequest


1 package org.junit.internal.requests;
2
3 import org.junit.internal.runners.CompositeRunner;
4 import org.junit.runner.Request;
5 import org.junit.runner.Runner;
6
7 public class ClassesRequest extends Request {
8     private final Class JavaDoc<?>[] fClasses;
9     private final String JavaDoc fName;
10     
11     public ClassesRequest(String JavaDoc name, Class JavaDoc<?>... classes) {
12         fClasses= classes;
13         fName= name;
14     }
15
16     /** @inheritDoc */
17     @Override JavaDoc
18     public Runner getRunner() {
19         CompositeRunner runner= new CompositeRunner(fName);
20         for (Class JavaDoc<?> each : fClasses) {
21             Runner childRunner= Request.aClass(each).getRunner();
22             if (childRunner != null)
23                 runner.add(childRunner);
24         }
25         return runner;
26     }
27 }
Popular Tags