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