1 26 27 package net.sourceforge.groboutils.junit.v1; 28 29 import junit.framework.Test; 31 import junit.framework.TestCase; 32 import junit.framework.TestSuite; 33 import junit.framework.TestResult; 34 35 import java.io.IOException ; 36 import java.lang.reflect.Method ; 37 38 39 47 public class JUnitTestResultEUTest extends TestCase 48 { 49 52 private static final Class THIS_CLASS = JUnitTestResultEUTest.class; 53 55 public JUnitTestResultEUTest( String name ) 56 { 57 super( name ); 58 } 59 60 61 62 63 66 67 public void testSetupErrorCount() 68 { 69 TestResult tr = new TestResult(); 70 assertEquals( 71 "Should have no errors now.", 72 0, 73 tr.errorCount() ); 74 } 75 76 77 public void testSetupFailureCount() 78 { 79 TestResult tr = new TestResult(); 80 assertEquals( 81 "Should have no failures now.", 82 0, 83 tr.failureCount() ); 84 } 85 86 87 public void testSetupRunCount() 88 { 89 TestResult tr = new TestResult(); 90 assertEquals( 91 "Should have no tests now.", 92 0, 93 tr.runCount() ); 94 } 95 96 97 98 101 102 public static Test suite() 103 { 104 TestSuite suite = new TestSuite( THIS_CLASS ); 105 106 return suite; 107 } 108 109 public static void main( String [] args ) 110 { 111 String [] name = { THIS_CLASS.getName() }; 112 113 116 junit.textui.TestRunner.main( name ); 117 } 118 119 120 124 protected void setUp() throws Exception 125 { 126 super.setUp(); 127 128 } 130 131 132 136 protected void tearDown() throws Exception 137 { 138 140 141 super.tearDown(); 142 } 143 } 144 145 | Popular Tags |