01: package org.quartz.utils;
02:
03: import java.util.Properties;
04:
05: import junit.framework.TestCase;
06:
07: /**
08: * Unit tests for PropertiesParser.
09: */
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 props = new Properties();
18: props.put("x.y.z", "");
19:
20: PropertiesParser propertiesParser = new PropertiesParser(props);
21: Properties propGroup = propertiesParser.getPropertyGroup("x.y",
22: true, new String[] {});
23: assertEquals("", propGroup.getProperty("z"));
24: }
25: }
|