You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by sz...@apache.org on 2008/11/14 17:39:28 UTC
svn commit: r714064 -
/directory/sandbox/szoerner/syspropPartition/src/test/java/org/apache/directory/samples/partition/sysprops/backend/SystemPropertyGeneratorTest.java
Author: szoerner
Date: Fri Nov 14 08:39:28 2008
New Revision: 714064
URL: http://svn.apache.org/viewvc?rev=714064&view=rev
Log:
Several improvements
Modified:
directory/sandbox/szoerner/syspropPartition/src/test/java/org/apache/directory/samples/partition/sysprops/backend/SystemPropertyGeneratorTest.java
Modified: directory/sandbox/szoerner/syspropPartition/src/test/java/org/apache/directory/samples/partition/sysprops/backend/SystemPropertyGeneratorTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/szoerner/syspropPartition/src/test/java/org/apache/directory/samples/partition/sysprops/backend/SystemPropertyGeneratorTest.java?rev=714064&r1=714063&r2=714064&view=diff
==============================================================================
--- directory/sandbox/szoerner/syspropPartition/src/test/java/org/apache/directory/samples/partition/sysprops/backend/SystemPropertyGeneratorTest.java (original)
+++ directory/sandbox/szoerner/syspropPartition/src/test/java/org/apache/directory/samples/partition/sysprops/backend/SystemPropertyGeneratorTest.java Fri Nov 14 08:39:28 2008
@@ -1,12 +1,32 @@
package org.apache.directory.samples.partition.sysprops.backend;
+import java.util.Properties;
+import java.util.Set;
+
import junit.framework.TestCase;
+/**
+ * Tests filling a property storage with the system property.
+ */
public class SystemPropertyGeneratorTest extends TestCase {
public void testFilling() {
+
+ // Fill storage
PropertyStorage storage = new PropertyStorage();
SystemPropertyGenerator.fill(storage);
+
+ // Check, whether the system properties are stored within
+ Properties props = System.getProperties();
+ Set<Object> keys = props.keySet();
+ for (Object key : keys) {
+
+ PropertyNode node = storage.findByKey(key.toString());
+ assertNotNull(node);
+ assertEquals(node.getKey(), key);
+
+ String value = System.getProperty(key.toString());
+ assertEquals(value, node.getValue());
+ }
}
-
}