KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > quartz > utils > PropertiesParserTest


1 package org.quartz.utils;
2
3 import java.util.Properties JavaDoc;
4
5 import junit.framework.TestCase;
6
7 /**
8  * Unit tests for PropertiesParser.
9  */

10 public class PropertiesParserTest extends TestCase {
11
12     /**
13      * Unit test for full getPropertyGroup() method.
14      */

15     public void testGetPropertyGroupStringBooleanStringArray() {
16         // Test that an empty property does not cause an exception
17
Properties JavaDoc props = new Properties JavaDoc();
18         props.put("x.y.z", "");
19         
20         PropertiesParser propertiesParser = new PropertiesParser(props);
21         Properties JavaDoc propGroup = propertiesParser.getPropertyGroup("x.y", true, new String JavaDoc[] {});
22         assertEquals("", propGroup.getProperty("z"));
23     }
24 }
25
Popular Tags