Package org.junit.runner

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


        assertAnnotationFiltering(runner);
    }

    private void assertAnnotationFiltering(JUnit38ClassRunner runner) {
        Description d = runner.getDescription();
        assertEquals(2, d.testCount());
        for (Description methodDesc : d.getChildren()) {
            if (methodDesc.getMethodName().equals("testAnnotated")) {
                assertNotNull(methodDesc.getAnnotation(MyAnnotation.class));
            } else {
                assertNull(methodDesc.getAnnotation(MyAnnotation.class));
View Full Code Here


    return childrenInvoker(notifier);
  }

  protected boolean isRateRunnerEnabled() {
    Description description = getDescription();
    return description.testCount() > 1 && !isScriptValidation();
  }

  private boolean isScriptValidation() {
    try {
      return Grinder.grinder.getProperties().getBoolean("grinder.script.validation", false);
View Full Code Here

   *
   * @return true if enabled;
   */
  protected boolean isRateRunnerEnabled() {
    Description description = getDescription();
    return description.testCount() > 1 && isRepeatRunnerEnabled();
  }

  private boolean isRepeatRunnerEnabled() {
    Annotation[] annotations = getTestClass().getAnnotations();
    boolean repeatAnnotation = false;
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.