01: package de.java2html.util.test;
02:
03: import de.java2html.util.LinkedProperties;
04: import junit.framework.TestCase;
05:
06: /**
07: * @author Markus Gebhard
08: */
09: public class LinkedPropertiesTest extends TestCase {
10: private LinkedProperties properties;
11:
12: protected void setUp() throws Exception {
13: properties = new LinkedProperties();
14: }
15:
16: public void testCreate() {
17: assertEquals(0, properties.size());
18: assertTrue(properties.isEmpty());
19: }
20:
21: public void testSetProperty() {
22: properties.setProperty("key", "value"); //$NON-NLS-1$//$NON-NLS-2$
23: assertEquals("value", properties.get("key")); //$NON-NLS-1$ //$NON-NLS-2$
24: assertEquals("value", properties.getProperty("key")); //$NON-NLS-1$ //$NON-NLS-2$
25: }
26:
27: public void testGetDefaultValue() {
28: assertEquals(
29: "default", properties.getProperty("key", "default")); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
30: }
31: }
|