KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > junitx > util > ResourceManagerTest


1 package junitx.util;
2
3 import junit.framework.TestCase;
4
5 /**
6  * @version $Revision: 1.1 $ $Date: 2003/03/21 06:13:50 $
7  * @author <a HREF="mailto:vbossica@users.sourceforge.net">Vladimir R. Bossicard</a>
8  */

9 public class ResourceManagerTest extends TestCase {
10
11     static int value = 1;
12
13     public ResourceManagerTest(String JavaDoc name) {
14         super(name);
15     }
16
17     public void setUp() {
18         if (!ResourceManager.containsResource("test")) {
19             ResourceManager.addResource("test", new Integer JavaDoc(value));
20             value++;
21         }
22     }
23
24     public void test1() throws Exception JavaDoc {
25         assertEquals(new Integer JavaDoc(1), ResourceManager.getResource("test"));
26     }
27
28     public void test2() throws Exception JavaDoc {
29         assertEquals(new Integer JavaDoc(1), ResourceManager.getResource("test"));
30     }
31
32     public void test3() throws Exception JavaDoc {
33         assertEquals(new Integer JavaDoc(1), ResourceManager.getResource("test"));
34     }
35
36     public void test4() throws Exception JavaDoc {
37         assertEquals(new Integer JavaDoc(1), ResourceManager.getResource("test"));
38     }
39
40     public void test5() throws Exception JavaDoc {
41         assertEquals(new Integer JavaDoc(1), ResourceManager.getResource("test"));
42     }
43
44 }
45
Popular Tags