@Override public Description getDescription() { return Description.createSuiteDescription(clazz); } }
@Override public Description getDescription() { return Description.createSuiteDescription(fTestClass); } }
private static Description parentDescription(Description description) { Class<?> testClass= description.getTestClass(); return testClass == null ? null : Description.createSuiteDescription(testClass); }
private Description parentDescription(Description description) { Class<?> testClass = description.getTestClass(); if (testClass == null) { return null; } return Description.createSuiteDescription(testClass); }
@Override public Description getDescription() { Description description = Description.createSuiteDescription(classNames); for (Throwable each : causes) { description.addChild(describeCause()); } return description; }
@Override public Description getDescription() { Description description = Description.createSuiteDescription(fTestClass); for (Throwable each : fCauses) { description.addChild(describeCause(each)); } return description; }
private void findLeaves(Description parent, Description description, List<Description> results) { if (description.getChildren().isEmpty()) { if (description.toString().equals("warning(junit.framework.TestSuite$1)")) { results.add(Description.createSuiteDescription(MALFORMED_JUNIT_3_TEST_CLASS_PREFIX + parent)); } else { results.add(description); } } else { for (Description each : description.getChildren()) { findLeaves(description, each, results); } } } }
private void findLeaves(Description parent, Description description, List<Description> results) { if (description.getChildren().isEmpty()) { if (description.toString().equals("warning(junit.framework.TestSuite$1)")) { results.add(Description.createSuiteDescription(MALFORMED_JUNIT_3_TEST_CLASS_PREFIX + parent)); } else { results.add(description); } } else { for (Description each : description.getChildren()) { findLeaves(description, each, results); } } } }
@Override public Description getDescription() { Class<?> clazz = getTestClass().getJavaClass(); Description description; // if subclass overrides `getName()` then we should use it // to maintain backwards compatibility with JUnit 4.12 if (clazz == null || !clazz.getName().equals(getName())) { description = Description.createSuiteDescription(getName(), getRunnerAnnotations()); } else { description = Description.createSuiteDescription(clazz, getRunnerAnnotations()); } for (T child : getFilteredChildren()) { description.addChild(describeChild(child)); } return description; }
@Override public Description getDescription() { Description spec = Description.createSuiteDescription(getName(), classAnnotations()); List<Method> testMethods = this.testMethods; for (Method method : testMethods) { spec.addChild(methodDescription(method)); } return spec; }
private Description createChildrenDescriptions(Runner runner, String suiteName) { Description suite = Description.createSuiteDescription(suiteName); for (Description child : runner.getDescription().getChildren()) { suite.addChild(child); } return suite; }
@Override public Description getDescription() { Description spec = Description.createSuiteDescription(getName(), classAnnotations()); List<Method> testMethods = fTestMethods; for (Method method : testMethods) { spec.addChild(methodDescription(method)); } return spec; }
@Override public Description getDescription() { if (suiteDescription == null) { suiteDescription = Description.createSuiteDescription(testClass); for (Method child : getFilteredChildren()) { suiteDescription.addChild(describeChild(child)); } } return suiteDescription; }
/** * Return a description suitable for an ignored test class if the test is * disabled via {@code @IfProfileValue} at the class-level, and * otherwise delegate to the parent implementation. * @see ProfileValueUtils#isTestEnabledInThisEnvironment(Class) */ @Override public Description getDescription() { if (!ProfileValueUtils.isTestEnabledInThisEnvironment(getTestClass().getJavaClass())) { return Description.createSuiteDescription(getTestClass().getJavaClass()); } return super.getDescription(); }
@Override public Description getDescription() { Description description = Description.createSuiteDescription(getName(), getRunnerAnnotations()); for (T child : getFilteredChildren()) { description.addChild(describeChild(child)); } return description; }
@Override public Description getDescription() { Description description = Description.createSuiteDescription(klass); description.addChild(createChildrenDescriptions(ruleTests, "Rule Tests")); if (ruleTests.hasUnitTests()) { description.addChild(createChildrenDescriptions(unitTests, "Unit Tests")); } return description; }
@Override public Description getDescription() { if (description == null) { description = Description.createSuiteDescription(getName(), new FeatureId(cucumberFeature)); for (PickleRunner child : getChildren()) { description.addChild(describeChild(child)); } } return description; }
@Override public Description getDescription() { if (description == null) { description = Description.createSuiteDescription(getName(), new PickleId(pickleEvent)); for (PickleStep step : getChildren()) { description.addChild(describeChild(step)); } } return description; }
public void describeSpecMethods() { Description desc = Description.createSuiteDescription(spec.getReflection()); spec.setDescription(desc); for (FeatureInfo feature : spec.getAllFeatures()) describeFeature(feature); for (MethodInfo fixtureMethod : spec.getAllFixtureMethods()) describeMethod(fixtureMethod); }
public void describeSpec() { Description desc = Description.createSuiteDescription(spec.getReflection()); spec.setDescription(desc); // important for JUnit compatibility: Descriptions of specs that are reported // as "ignored" to JUnit must not have any children if (spec.isExcluded() || spec.isSkipped()) return; for (FeatureInfo feature : spec.getAllFeaturesInExecutionOrder()) { if (feature.isExcluded()) continue; if (feature.isReportIterations()) continue; // don't report up-front because IDEs don't handle this well desc.addChild(feature.getFeatureMethod().getDescription()); } }