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 <?>[] fClasses; 9 private final String fName; 10 11 public ClassesRequest(String name, Class <?>... classes) { 12 fClasses= classes; 13 fName= name; 14 } 15 16 17 @Override 18 public Runner getRunner() { 19 CompositeRunner runner= new CompositeRunner(fName); 20 for (Class <?> 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 |