Examples of errorCount()


Examples of junit.framework.TestResult.errorCount()

  @Test public void prerequsitesRunnerInternalFailCompatibility() {
    TestResult result = new TestResult();
    JUnit4TestAdapter adapter = new AnnotationHandlingJUnit4TestAdapter(APrereqInternalFailTest.class);
    adapter.run(result);
    assertEquals(0, result.runCount());
    assertEquals(6, result.errorCount());
    // internal errors are reported as failures
    assertEquals(0, result.failureCount());
  }

  public static class APrereqTestWithoutRunWith {
View Full Code Here

Examples of junit.framework.TestResult.errorCount()

  }
  public void testFailure() {
    ExceptionTestCase test= new ThrowRuntimeExceptionTestCase("test", IndexOutOfBoundsException.class);
    TestResult result= test.run();
    assertEquals(1, result.runCount());
    assertEquals(1, result.errorCount());
  }
  public void testNoException() {
    ExceptionTestCase test= new ThrowNoExceptionTestCase("test", Exception.class);
    TestResult result= test.run();
    assertEquals(1, result.runCount());
View Full Code Here

Examples of junit.framework.TestResult.errorCount()

  }
  public void testWrongException() {
    ExceptionTestCase test= new ThrowRuntimeExceptionTestCase("test", IndexOutOfBoundsException.class);
    TestResult result= test.run();
    assertEquals(1, result.runCount());
    assertEquals(1, result.errorCount());
  }
}
View Full Code Here

Examples of junit.framework.TestResult.errorCount()

    Test t= new TestSuite(NoArgTestCaseTest.class);
    TestResult result= new TestResult();
    t.run(result);
    assertTrue(result.runCount() == 1);
    assertTrue(result.failureCount() == 0);
    assertTrue(result.errorCount() == 0);
  }
 
  public void testNamelessTestCase() {
    TestCase t= new TestCase() {};
    TestResult result = t.run();
View Full Code Here

Examples of junit.framework.TestResult.errorCount()

 
  void verifyError(TestCase test) {
    TestResult result= test.run();
    assertTrue(result.runCount() == 1);
    assertTrue(result.failureCount() == 0);
    assertTrue(result.errorCount() == 1);
  }
  void verifyFailure(TestCase test) {
    TestResult result= test.run();
    assertTrue(result.runCount() == 1);
    assertTrue(result.failureCount() == 1);
View Full Code Here

Examples of junit.framework.TestResult.errorCount()

  }
  void verifyFailure(TestCase test) {
    TestResult result= test.run();
    assertTrue(result.runCount() == 1);
    assertTrue(result.failureCount() == 1);
    assertTrue(result.errorCount() == 0);
  }
  void verifySuccess(TestCase test) {
    TestResult result= test.run();
    assertTrue(result.runCount() == 1);
    assertTrue(result.failureCount() == 0);
View Full Code Here

Examples of junit.framework.TestResult.errorCount()

  }
  void verifySuccess(TestCase test) {
    TestResult result= test.run();
    assertTrue(result.runCount() == 1);
    assertTrue(result.failureCount() == 0);
    assertTrue(result.errorCount() == 0);
  }
}
View Full Code Here

Examples of junit.framework.TestResult.errorCount()

 
  public void testSuccessfulRun() {
    TestResult result= new TestResult();
    fTest.run(result);
    assertEquals(fTest.countTestCases(), result.runCount());
    assertEquals(0, result.errorCount());
    assertEquals(0, result.failureCount());
  }
}
View Full Code Here

Examples of junit.framework.TestResult.errorCount()

  }

  @Test public void compatibility() {
    TestResult result= new TestResult();
    new JUnit4TestAdapter(InfiniteLoopTest.class).run(result);
    assertEquals(1, result.errorCount());
  }
 
  static public junit.framework.Test suite() {
    return new JUnit4TestAdapter(TimeoutTest.class);
  }
View Full Code Here

Examples of junit.framework.TestResult.errorCount()

    TestResult result= new TestResult();
    wrapper.run(result);

    assertEquals(1, result.failureCount());
    assertEquals(1, result.errorCount());
  }
  public void testSetupErrorDontTearDown() {
    WasRun test= new WasRun();

    TornDown wrapper= new TornDown(test) {
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.