KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > junitx > util > XMLPropertyManagerTest


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

9 public class XMLPropertyManagerTest
10         extends TestCase {
11
12     public XMLPropertyManagerTest(String JavaDoc 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