@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; }
@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() { 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; }
private Description removeIgnored(Description description) { if (isIgnored(description)) { return Description.EMPTY; } Description result = description.childlessCopy(); for (Description each : description.getChildren()) { Description child = removeIgnored(each); if (!child.isEmpty()) { result.addChild(child); } } return result; }
@Override public Description getDescription() { Description description = Description.createSuiteDescription(getName(), getRunnerAnnotations()); for (T child : getFilteredChildren()) { description.addChild(describeChild(child)); } return description; }
private Description removeIgnored(Description description) { if (isIgnored(description)) { return Description.EMPTY; } Description result = description.childlessCopy(); for (Description each : description.getChildren()) { Description child = removeIgnored(each); if (!child.isEmpty()) { result.addChild(child); } } return result; }
@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() { 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; }
private static Description makeDescription(Test test) { if (test instanceof TestCase) { TestCase tc = (TestCase) test; return Description.createTestDescription(tc.getClass(), tc.getName()); } else if (test instanceof TestSuite) { TestSuite ts = (TestSuite) test; String name = ts.getName() == null ? createSuiteDescription(ts) : ts.getName(); Description description = Description.createSuiteDescription(name); int n = ts.testCount(); for (int i = 0; i < n; i++) { Description made = makeDescription(ts.testAt(i)); description.addChild(made); } return description; } else if (test instanceof Describable) { Describable adapter = (Describable) test; return adapter.getDescription(); } else if (test instanceof TestDecorator) { TestDecorator decorator = (TestDecorator) test; return makeDescription(decorator.getTest()); } else { // This is the best we can do in this case return Description.createSuiteDescription(test.getClass()); } }
private static Description makeDescription(Test test) { if (test instanceof TestCase) { TestCase tc = (TestCase) test; return Description.createTestDescription(tc.getClass(), tc.getName(), getAnnotations(tc)); } else if (test instanceof TestSuite) { TestSuite ts = (TestSuite) test; String name = ts.getName() == null ? createSuiteDescription(ts) : ts.getName(); Description description = Description.createSuiteDescription(name); int n = ts.testCount(); for (int i = 0; i < n; i++) { Description made = makeDescription(ts.testAt(i)); description.addChild(made); } return description; } else if (test instanceof Describable) { Describable adapter = (Describable) test; return adapter.getDescription(); } else if (test instanceof TestDecorator) { TestDecorator decorator = (TestDecorator) test; return makeDescription(decorator.getTest()); } else { // This is the best we can do in this case return Description.createSuiteDescription(test.getClass()); } }
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()); } }
@Override public Description getDescription() { Description description = Description.createSuiteDescription(fTestClass); for (Throwable each : fCauses) { description.addChild(describeCause(each)); } return description; }
@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() { Description description = Description.createSuiteDescription(getName(), getRunnerAnnotations()); for (T child : getFilteredChildren()) { description.addChild(describeChild(child)); } return description; }
private Description describeRepeatTest(FrameworkMethod method) { int times = method.getAnnotation(Repeat.class).value(); Description description = Description.createSuiteDescription( testName(method) + " [" + times + " times]", method.getAnnotations()); for (int i = 1; i <= times; i++) { description.addChild(Description.createTestDescription( getTestClass().getJavaClass(), testName(method) + "-" + i)); } return description; }