1 package junitx.util; 2 3 import junit.framework.TestCase; 4 5 9 public class XMLPropertyManagerTest 10 extends TestCase { 11 12 public XMLPropertyManagerTest(String name) { 13 super(name); 14 } 15 16 public void testSuccessGetProperty() { 17 assertEquals("value1", XMLPropertyManager.getProperty("test1")); 18 } 19 20 public void testSuccessGetProperty2() { 21 assertEquals("value2", XMLPropertyManager.getProperty("test2")); 22 } 23 24 public void testSuccessDefaultProperty2() { 25 assertEquals("value2", XMLPropertyManager.getProperty("test2", "defaultvalue2")); 26 } 27 28 public void testFailureMissingProperty() { 29 assertEquals(null, XMLPropertyManager.getProperty("test3")); 30 } 31 32 public void testSuccessMissingProperty() { 33 assertEquals("defaultvalue", XMLPropertyManager.getProperty("test3", "defaultvalue")); 34 } 35 36 } | Popular Tags |