Package org.junit.runner

Examples of org.junit.runner.Description.addChild()


    @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;
    }

    protected Annotation[] classAnnotations() {
View Full Code Here


      TestSuite ts= (TestSuite) test;
      String name= ts.getName() == null ? "" : ts.getName();
      Description description= Description.createSuiteDescription(name);
      int n= ts.testCount();
      for (int i= 0; i < n; i++)
        description.addChild(makeDescription(ts.testAt(i)));
      return description;
    } else if (test instanceof JUnit4TestAdapter) {
      JUnit4TestAdapter adapter= (JUnit4TestAdapter) test;
      return adapter.getDescription();
    } else if (test instanceof TestDecorator) {
View Full Code Here

  @Override
  public Description getDescription() {
    Description spec= Description.createSuiteDescription(fName);
    for (Runner runner : fRunners)
      spec.addChild(runner.getDescription());
    return spec;
  }

  public List<Runner> getRunners() {
    return fRunners;
View Full Code Here

  @Override
  public Description getDescription() {
    Description spec= Description.createSuiteDescription(getName(), classAnnotations());
    List<Method> testMethods= fTestMethods;
    for (Method method : testMethods)
      spec.addChild(methodDescription(method));
    return spec;
  }

  protected Annotation[] classAnnotations() {
    return fTestClass.getJavaClass().getAnnotations();
View Full Code Here

    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());
    }
  }

  private void describeFeature(FeatureInfo feature) {
    Description desc = describeMethod(feature.getFeatureMethod());
View Full Code Here

    @Override
    public Description getDescription() {
        Description spec = Description.createSuiteDescription(getName(), classAnnotations());
        List<Method> testMethods = fTestMethods;
        for (Method method : testMethods) {
            spec.addChild(methodDescription(method));
        }
        return spec;
    }

    protected Annotation[] classAnnotations() {
View Full Code Here

    @Override
    public Description getDescription() {
        Description description = Description.createSuiteDescription(getName(),
                getRunnerAnnotations());
        for (T child : getFilteredChildren()) {
            description.addChild(describeChild(child));
        }
        return description;
    }

    @Override
View Full Code Here

    @Override
    public Description getDescription() {
        Description description = Description.createSuiteDescription(fTestClass);
        for (Throwable each : fCauses) {
            description.addChild(describeCause(each));
        }
        return description;
    }

    @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.