Code example for TestResult

Methods: errorCount, failureCount, runCount

0
		assertTrue(fResult.failureCount() == 1);
		assertTrue(! fResult.wasSuccessful());
	} 
	public void testNotExistingTestCase() { 
		Test t= new SuiteTest("notExistingMethod");
		t.run(fResult);
		assertTrue(fResult.runCount() == 1);  
		assertTrue(fResult.failureCount() == 1);
		assertTrue(fResult.errorCount() == 0);
	} 
	public void testNotPublicTestCase() { 
		TestSuite suite= new TestSuite(NotPublicTestCase.class);
		// 1 public test case + 1 warning for the non-public test case 
		assertEquals(2, suite.countTestCases());
	} 
	public void testNotVoidTestCase() { 
		TestSuite suite= new TestSuite(NotVoidTestCase.class);
		assertTrue(suite.countTestCases() == 1);
	} 
	public void testOneTestCase() { 
		Test t= new TestSuite(OneTestCase.class);