Refine search
private Description createChildrenDescriptions(Runner runner, String suiteName) { Description suite = Description.createSuiteDescription(suiteName); for (Description child : runner.getDescription().getChildren()) { suite.addChild(child); } return suite; }
@Override protected void runChild(Runner runner, final RunNotifier notifier) { runner.run(notifier); } }
public int countTestCases() { return fRunner.testCount(); }
/** * Do not use. Testing purposes only. */ public Result run(Runner runner) { Result result = new Result(); RunListener listener = result.createListener(); notifier.addFirstListener(listener); try { notifier.fireTestRunStarted(runner.getDescription()); runner.run(notifier); notifier.fireTestRunFinished(result); } finally { removeListener(listener); } return result; }
@Override public Description getDescription() { Description description = Description .createSuiteDescription(super.getDescription().getTestClass()); for (Runner runner : runners) { description.addChild(runner.getDescription()); } return description; }
@Override public Description getDescription() { Description spec= Description.createSuiteDescription(ExampleGraph.class); for (Runner runner : fRunners) spec.addChild(runner.getDescription()); return spec; }
private boolean isAJUnitThreeErrorOrWarning(final Runner runner) { return !runner.getDescription().getChildren().isEmpty() && runner.getDescription().getChildren().get(0).getClassName() .startsWith("junit.framework.TestSuite"); }
@Override protected Description describeChild(Runner child) { return child.getDescription(); }
@Override protected void runChild(final Runner runner, final RunNotifier notifier) { if (beforeTestExecution((Class<? extends AbstractGremlinTest>) runner.getDescription().getTestClass())) super.runChild(runner, notifier); afterTestExecution((Class<? extends AbstractGremlinTest>) runner.getDescription().getTestClass()); }
private boolean isJUnitThreeSuiteMethodNotForOwnClass(final Runner runner, final String className) { // use strings in case this hack blows up due to internal junit change return runner.getClass().getName() .equals("org.junit.internal.runners.SuiteMethod") && !runner.getDescription().getClassName().equals(className); }
private void configureRunner(Runner runner) throws InvalidOrderingException { Description description = runner.getDescription(); OrderWith orderWith = description.getAnnotation(OrderWith.class); if (orderWith != null) { Ordering ordering = Ordering.definedBy(orderWith.value(), description); ordering.apply(runner); } }
/** * @return the number of tests to be run by the receiver */ public int testCount() { return getDescription().testCount(); } }
@Override public Description getDescription() { if (this.accept) { return this.secondaryRunner.getDescription(); } return Description.createSuiteDescription(this.klass); }
@Override public Description getDescription() { Description suiteDescription = classRunner.getDescription(); for (Runner childRunner : childRunners) { suiteDescription.addChild(childRunner.getDescription()); } return suiteDescription; }
@Override public void prune() { if (wasFiltered) { // filtering the runner may render intermediate Descriptions obsolete // (e.g. test classes without any remaining children in a suite) pruneDescriptorsForObsoleteDescriptions(singletonList(runner.getDescription())); } if (rejectedExclusions.isEmpty()) { super.prune(); } else if (rejectedExclusions.containsAll(getDescription().getChildren())) { // since the Runner was asked to remove all of its direct children, // it's safe to remove it entirely removeFromHierarchy(); } else { logIncompleteFiltering(); } }
@Override public Description getDescription() { final Description spec = Description.createSuiteDescription(fName); for (final Runner runner : fRunners) spec.addChild(runner.getDescription()); return spec; }
private boolean isAJUnitThreeErrorOrWarning(final Runner runner) { return !runner.getDescription().getChildren().isEmpty() && runner.getDescription().getChildren().get(0).getClassName() .startsWith("junit.framework.TestSuite"); }
@Override protected Description describeChild(Runner child) { return child.getDescription(); }
@Override protected void runChild(final Runner runner, final RunNotifier notifier) { if (beforeTestExecution((Class<? extends AbstractGremlinTest>) runner.getDescription().getTestClass())) super.runChild(runner, notifier); afterTestExecution((Class<? extends AbstractGremlinTest>) runner.getDescription().getTestClass()); }
private boolean isJUnitThreeSuiteMethodNotForOwnClass(final Runner runner, final String className) { // use strings in case this hack blows up due to internal junit change return runner.getClass().getName() .equals("org.junit.internal.runners.SuiteMethod") && !runner.getDescription().getClassName().equals(className); }