1 7 package woolfel; 8 9 import junit.framework.TestCase; 10 11 17 public class DummyTestCase extends TestCase { 18 19 22 public DummyTestCase() { 23 super(); 24 } 25 26 29 protected DummyTestCase(String arg0) { 30 super(arg0); 31 } 32 33 public void setUp(){ 34 System.out.println("setup called"); 35 } 36 37 public void tearDown(){ 38 System.out.println("tearDown called"); 39 } 40 41 public void testMethodPass() { 42 try { 43 Thread.sleep(100); 44 assertEquals(10,10); 45 } catch (InterruptedException e) { 46 e.printStackTrace(); 47 } 48 } 49 50 public void testMethodPass2() { 51 try { 52 Thread.sleep(100); 53 assertEquals("one","one"); 54 } catch (InterruptedException e) { 55 e.printStackTrace(); 56 } 57 } 58 59 public void testMethodFail() { 60 try { 61 Thread.sleep(100); 62 assertEquals(20,10); 63 } catch (InterruptedException e) { 64 e.printStackTrace(); 65 } 66 } 67 68 public void testMethodFail2() { 69 try { 70 Thread.sleep(100); 71 assertEquals("one","two"); 72 } catch (InterruptedException e) { 73 e.printStackTrace(); 74 } 75 } 76 } 77 | Popular Tags |