Package org.junit.runner

Examples of org.junit.runner.Description


    fCauses= getCauses(cause);
  }

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


    return Description.createTestDescription(fTestClass,
        "initializationError");
  }

  private void runCause(Throwable child, RunNotifier notifier) {
    Description description= describeCause(child);
    notifier.fireTestStarted(description);
    notifier.fireTestFailure(new Failure(description, child));
    notifier.fireTestFinished(description);
  }
View Full Code Here

    this.parameters = parameters;
  }

  private Description createDescription(TestClass testClass, BundleRepository[] repositories) {
    if (repositories.length == 1) {
      Description testClassDescription = Description.createSuiteDescription(testClass.getJavaClass());
      for (FrameworkMethod method : testClass.getAnnotatedMethods(Test.class.getName())) {
        testClassDescription.addChild(methodDescription(testClass, method, 0));
      }
      return testClassDescription;
    } else {
      Description testParentDescription = Description.createSuiteDescription(testClass.getJavaClass());
      int index = 0;
      for (BundleRepository repository : repositories) {
        index++;
        Description testClassDescription = Description.createSuiteDescription(repository.getLocation().toString());
        testParentDescription.addChild(testClassDescription);
        for (FrameworkMethod method : testClass.getAnnotatedMethods(Test.class.getName())) {
          testClassDescription.addChild(methodDescription(testClass, method, index));
        }
      }
      return testParentDescription;
    }
  }
View Full Code Here

   * compatibility clashes that were introduced in JUnit between versions 4.5,
   * 4.6, and 4.7.
   */
  private D2JExcelNotifier djMakeNotifier(FrameworkMethod method,
      RunNotifier notifier, String data) {
    Description description = describeChild(method, data);
    // Added for particular test case notification in excel
    return new D2JExcelNotifier(notifier, description);
  }
View Full Code Here

  public Class<?> getTestClass() {
    return fNewTestClass;
  }
 
  public Description getDescription() {
    Description description= fRunner.getDescription();   
    return removeIgnored(description);
  }
View Full Code Here

  }

  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;
  }
View Full Code Here

  // Implementation of ParentRunner
  //

  @Override
  protected void runChild(final FrameworkMethod method, RunNotifier notifier) {
    Description description= describeChild(method);
    if (method.getAnnotation(Ignore.class) != null) {
      notifier.fireTestIgnored(description);
    } else {
      runLeaf(methodBlock(method), description, notifier);
    }
View Full Code Here

  // Implementation of Runner
  //
 
  @Override
  public Description getDescription() {
    Description description= Description.createSuiteDescription(getName(),
        getRunnerAnnotations());
    for (T child : getFilteredChildren())
      description.addChild(describeChild(child));
    return description;
  }
View Full Code Here

    fCauses= getCauses(cause);
  }

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

    return Description.createTestDescription(fTestClass,
        "initializationError");
  }

  private void runCause(Throwable child, RunNotifier notifier) {
    Description description= describeCause(child);
    notifier.fireTestStarted(description);
    notifier.fireTestFailure(new Failure(description, child));
    notifier.fireTestFinished(description);
  }
View Full Code Here

TOP

Related Classes of org.junit.runner.Description

Copyright © 2018 www.massapicom. 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.