Package org.junit.runner

Examples of org.junit.runner.Description


        causes = getCauses(cause);
    }

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


        return Description.createTestDescription(testClass,
                "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

    // Implementation of ParentRunner
    //

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

        return child.getAnnotation(Ignore.class) != null;
    }

    @Override
    protected Description describeChild(FrameworkMethod method) {
        Description description = methodDescriptions.get(method);

        if (description == null) {
            description = Description.createTestDescription(getTestClass().getJavaClass(),
                    testName(method), method.getAnnotations());
            methodDescriptions.putIfAbsent(method, description);
View Full Code Here

          @Override
          public void run(final RunNotifier notifier) {
            final IOCClientTestCase iocClientTestCase = (IOCClientTestCase) getInstance();

            final Description description = getDescription();

            notifier.fireTestStarted(description);

            final TestResult result = new TestResult();
View Full Code Here

      each.run(notifier);
  }

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

    if (test instanceof TestCase) {
      TestCase tc= (TestCase) test;
      return Description.createTestDescription(tc.getClass(), tc.getName());
    } else if (test instanceof TestSuite) {
      TestSuite ts= (TestSuite) test;
      Description description= Description.createSuiteDescription(ts.getName());
      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 Runner getRunner() {
    List<Throwable> goofs= getCauses(fCause);
    CompositeRunner runner= new CompositeRunner(fClass.getName());
    for (int i= 0; i < goofs.size(); i++) {
      final Description description= Description.createTestDescription(fClass, "initializationError" + i);
      final Throwable throwable= goofs.get(i);
      runner.add(new ErrorReportingRunner(description, throwable));
    }
    return runner;
  }
View Full Code Here

    notifier.fireTestFinished(description);
  }

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

          @Override
          public void run(RunNotifier notifier) {
            final IOCClientTestCase iocClientTestCase = (IOCClientTestCase) getInstance();

            Description description = getDescription();

            notifier.fireTestStarted(description);

            TestResult result = new TestResult();
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.