Examples of runCount()


Examples of junit.framework.TestResult.runCount()

  @Test public void prerequsitesRunnerCompatibility() {
    TestResult result = new TestResult();
    JUnit4TestAdapter adapter = new AnnotationHandlingJUnit4TestAdapter(APrereqTest.class);
    adapter.run(result);
    assertEquals(1+4, result.runCount());
    assertEquals(0, result.errorCount());
    assertEquals(0, result.failureCount());
  }

  public static class APrereqInternalFailTest {
View Full Code Here

Examples of junit.framework.TestResult.runCount()

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

Examples of junit.framework.TestResult.runCount()

  }
 
  public void testExceptionSubclass() {
    ExceptionTestCase test= new ThrowExceptionTestCase("test", IndexOutOfBoundsException.class);
    TestResult result= test.run();
    assertEquals(1, result.runCount());
    assertTrue(result.wasSuccessful());
  }
  public void testExceptionTest() {
    ExceptionTestCase test= new ThrowExceptionTestCase("test", IndexOutOfBoundsException.class);
    TestResult result= test.run();
View Full Code Here

Examples of junit.framework.TestResult.runCount()

    assertTrue(result.wasSuccessful());
  }
  public void testExceptionTest() {
    ExceptionTestCase test= new ThrowExceptionTestCase("test", IndexOutOfBoundsException.class);
    TestResult result= test.run();
    assertEquals(1, result.runCount());
    assertTrue(result.wasSuccessful());
  }
  public void testFailure() {
    ExceptionTestCase test= new ThrowRuntimeExceptionTestCase("test", IndexOutOfBoundsException.class);
    TestResult result= test.run();
View Full Code Here

Examples of junit.framework.TestResult.runCount()

    assertTrue(result.wasSuccessful());
  }
  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();
View Full Code Here

Examples of junit.framework.TestResult.runCount()

 
  @Test public void ensureSuitesWorkWithForwardCompatibility() {
    junit.framework.Test test= new JUnit4TestAdapter(All.class);
    TestResult result= new TestResult();
    test.run(result);
    assertEquals(2, result.runCount());
  }

  @Test public void forwardCompatibilityWorksWithGetTests() {
    JUnit4TestAdapter adapter= new JUnit4TestAdapter(All.class);
    List<? extends junit.framework.Test> tests= adapter.getTests();
View Full Code Here

Examples of junit.framework.TestResult.runCount()

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

Examples of junit.framework.TestResult.runCount()

    assertEquals(1, result.failureCount());
  }
  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.runCount()

 
  public void testNoArgTestCasePasses() {
    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() {
View Full Code Here

Examples of junit.framework.TestResult.runCount()

    assertEquals(1, result.failureCount());
  }
 
  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();
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.