KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > woolfel > DummyTestCase


1 /*
2  * Created on Jul 24, 2005
3  *
4  * TODO To change the template for this generated file go to
5  * Window - Preferences - Java - Code Style - Code Templates
6  */

7 package woolfel;
8
9 import junit.framework.TestCase;
10
11 /**
12  * @author pete
13  *
14  * TODO To change the template for this generated type comment go to
15  * Window - Preferences - Java - Code Style - Code Templates
16  */

17 public class DummyTestCase extends TestCase {
18
19     /**
20      *
21      */

22     public DummyTestCase() {
23         super();
24     }
25
26     /**
27      * @param arg0
28      */

29     protected DummyTestCase(String JavaDoc 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 JavaDoc e) {
46             e.printStackTrace();
47         }
48     }
49     
50     public void testMethodPass2() {
51         try {
52             Thread.sleep(100);
53             assertEquals("one","one");
54         } catch (InterruptedException JavaDoc e) {
55             e.printStackTrace();
56         }
57     }
58
59     public void testMethodFail() {
60         try {
61             Thread.sleep(100);
62             assertEquals(20,10);
63         } catch (InterruptedException JavaDoc e) {
64             e.printStackTrace();
65         }
66     }
67     
68     public void testMethodFail2() {
69         try {
70             Thread.sleep(100);
71             assertEquals("one","two");
72         } catch (InterruptedException JavaDoc e) {
73             e.printStackTrace();
74         }
75     }
76 }
77
Popular Tags