Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2014-08-07 18:04:25 +0000
committerThomas Watson2014-08-07 18:42:55 +0000
commit2c2478f593605b9c4e1c34a7e1ec71f2740a7162 (patch)
tree518e19811f855daf38cf86ed1164ab2a5fdd745e
parentaa22df38a86fbe220038d26eef575c61473954f8 (diff)
downloadrt.equinox.framework-2c2478f593605b9c4e1c34a7e1ec71f2740a7162.tar.gz
rt.equinox.framework-2c2478f593605b9c4e1c34a7e1ec71f2740a7162.tar.xz
rt.equinox.framework-2c2478f593605b9c4e1c34a7e1ec71f2740a7162.zip
Bug 441377 - Add testcase for null configuration value
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java
index 60e2c7792..ae0d40d2b 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java
@@ -2189,6 +2189,23 @@ public class SystemBundleTests extends AbstractBundleTests {
}
}
+ static final String nullTest = "null.test";
+
+ public void testNullConfigurationValue() throws BundleException {
+ System.setProperty(nullTest, "system");
+ File config = OSGiTestsActivator.getContext().getDataFile(getName()); //$NON-NLS-1$
+ Map<String, Object> configuration = new HashMap<String, Object>();
+ configuration.put(Constants.FRAMEWORK_STORAGE, config.getAbsolutePath());
+ configuration.put(nullTest, null);
+ Equinox equinox = new Equinox(configuration);
+ equinox.start();
+ String nullValue = equinox.getBundleContext().getProperty(nullTest);
+ assertNull(nullTest + " is not null: " + nullValue, nullValue);
+ String systemNullValue = System.getProperty(nullTest);
+ assertEquals("Wrong system null value.", "system", systemNullValue);
+ equinox.stop();
+ }
+
private static File[] createBundles(File outputDir, int bundleCount) throws IOException {
outputDir.mkdirs();

Back to the top