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