Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-01-13 16:17:21 +0000
committerPascal Rapicault2010-01-13 16:17:21 +0000
commit39397b81698920b0710f07562127af23b03ff471 (patch)
tree8c698b344dbc2d5c3713e8e5b6989902f6d5bab8 /bundles/org.eclipse.equinox.frameworkadmin.test
parent62eb06de9e9564748a3048f99f307c32a984b214 (diff)
downloadrt.equinox.p2-39397b81698920b0710f07562127af23b03ff471.tar.gz
rt.equinox.p2-39397b81698920b0710f07562127af23b03ff471.tar.xz
rt.equinox.p2-39397b81698920b0710f07562127af23b03ff471.zip
Merging api branch back to HEAD
Diffstat (limited to 'bundles/org.eclipse.equinox.frameworkadmin.test')
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java6
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java10
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java51
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ParserUtilsTest.java83
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java6
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java3
25 files changed, 113 insertions, 87 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java
index 3e0bebd84..f328d966b 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java
@@ -268,7 +268,7 @@ public abstract class AbstractFwkAdminTest extends TestCase {
fail("String:" + lines[idx] + " not found");
}
- public void startSimpleConfiguratormManipulator() {
+ public void startSimpleConfiguratorManipulator() {
final String SIMPLECONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator";
Bundle manipulatorBundle = Platform.getBundle(SIMPLECONFIGURATOR_MANIPULATOR);
if (manipulatorBundle == null)
@@ -280,7 +280,7 @@ public abstract class AbstractFwkAdminTest extends TestCase {
}
}
- public void stopSimpleConfiguratormManipulator() {
+ public void stopSimpleConfiguratorManipulator() {
final String SIMPLECONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator";
Bundle manipulatorBundle = Platform.getBundle(SIMPLECONFIGURATOR_MANIPULATOR);
if (manipulatorBundle == null)
@@ -366,7 +366,7 @@ public abstract class AbstractFwkAdminTest extends TestCase {
}
protected Manipulator getFrameworkManipulator(File configuration, File launcher) throws BundleException {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java
index b6ab89d9c..0af378a55 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java
@@ -30,6 +30,7 @@ public class AllTests extends TestCase {
suite.addTestSuite(NoConfigurationValueInEclipseIni.class);
suite.addTestSuite(NoRenamingLauncherIni.class);
suite.addTestSuite(OSGiVersionChange.class);
+ suite.addTestSuite(ParserUtilsTest.class);
suite.addTestSuite(ReaderTest1.class);
suite.addTestSuite(ReaderTest2.class);
suite.addTestSuite(ReaderTest3.class);
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java
index 3165081cb..88f3eb0b8 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java
@@ -30,7 +30,7 @@ public class Bug196525 extends AbstractFwkAdminTest {
}
protected void setUp() throws Exception {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
//create a configuration with osgi and simpleconfigurator in it
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java
index d94006d86..8cc373a12 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java
@@ -10,19 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.frameworkadmin.tests;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
-
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-
-import java.net.URISyntaxException;
-
-import org.osgi.framework.BundleException;
-
import java.io.File;
import java.io.IOException;
+import java.net.URISyntaxException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.URIUtil;
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
+import org.osgi.framework.BundleException;
public class Bug258370 extends FwkAdminAndSimpleConfiguratorTest {
public Bug258370(String name) {
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java
index 5ccf81e2d..33f4a0d3b 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java
@@ -10,12 +10,11 @@
*******************************************************************************/
package org.eclipse.equinox.frameworkadmin.tests;
-import org.osgi.framework.Constants;
-
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.URIUtil;
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
+import org.osgi.framework.Constants;
public class FrameworkExtensionTest extends FwkAdminAndSimpleConfiguratorTest {
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java
index b700e9fd4..bf95063cc 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java
@@ -28,7 +28,7 @@ public abstract class FwkAdminAndSimpleConfiguratorTest extends AbstractFwkAdmin
protected void setUp() throws Exception {
super.setUp();
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
}
protected Manipulator getNewManipulator(String workArea) throws FrameworkAdminRuntimeException, IOException, BundleException {
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java
index eec9ace3f..1e336a4da 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java
@@ -25,7 +25,7 @@ public class LauncherConfigLocationTest extends AbstractFwkAdminTest {
}
public void testCustomLauncherConfig() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java
index edcdcb7b3..021b5a8d0 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java
@@ -10,9 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.frameworkadmin.tests;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
/**
* @since 1.0
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java
index 896d10dca..d805e5a85 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java
@@ -8,14 +8,13 @@
******************************************************************************/
package org.eclipse.equinox.frameworkadmin.tests;
-import org.eclipse.osgi.service.environment.Constants;
-
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
+import org.eclipse.osgi.service.environment.Constants;
import org.osgi.framework.BundleException;
public class MacOSLikeSetup extends FwkAdminAndSimpleConfiguratorTest {
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java
index 49e56513d..d151c7a93 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java
@@ -12,10 +12,9 @@
package org.eclipse.equinox.frameworkadmin.tests;
import java.io.*;
-import java.util.*;
+import java.util.Properties;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
public class ManipulatorTests extends AbstractFwkAdminTest {
@@ -57,7 +56,7 @@ public class ManipulatorTests extends AbstractFwkAdminTest {
File ini = new File(folder, "eclipse.ini");
writeEclipseIni(ini, new String[] {"-foo", "bar", "-vmargs", "-Xmx256m"});
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
@@ -100,50 +99,4 @@ public class ManipulatorTests extends AbstractFwkAdminTest {
assertContents(ini, new String[] {"-foo", "bar", "-console", "-vmargs", "-Xmx256m", "-Xms64m"});
}
- public void testParserUtils_removeArgument() throws Exception {
- String [] args = new String [] { "-bar", "-foo", "-other"};
- ParserUtils.removeArgument("-foo", Arrays.asList(args));
- assertEquals(args, new String [] {"-bar", null, "-other"});
-
- args = new String [] { "-bar", "-foo", "other"};
- ParserUtils.removeArgument("-foo", Arrays.asList(args));
- assertEquals(args, new String [] {"-bar", null, null});
-
- args = new String [] { "-bar", "-foo", "s-pecial"};
- ParserUtils.removeArgument("-foo", Arrays.asList(args));
- assertEquals(args, new String [] {"-bar", null, null});
- }
-
- public void testParserUtils_setValueForArgument() throws Exception {
- List args = new ArrayList();
- ParserUtils.setValueForArgument("-foo", "bar", args);
- assertTrue(args.size() == 2);
- assertEquals(args.get(0), "-foo");
- assertEquals(args.get(1), "bar");
-
- args.add("-other");
- args.set(1, "s-pecial");
- ParserUtils.setValueForArgument("-foo", "bas", args);
- assertTrue(args.size() == 3);
- assertEquals(args.get(0), "-foo");
- assertEquals(args.get(1), "bas");
- assertEquals(args.get(2), "-other");
-
- args.remove(1);
- ParserUtils.setValueForArgument("-foo", "bas", args);
- assertTrue(args.size() == 3);
- assertEquals(args.get(0), "-foo");
- assertEquals(args.get(1), "bas");
- assertEquals(args.get(2), "-other");
- }
-
- public void testParserUtils_getValueForArgument() throws Exception {
- List args = new ArrayList();
- args.add("-foo");
- args.add("bar");
- assertEquals( "bar", ParserUtils.getValueForArgument("-foo", args));
-
- args.set(1, "-bar");
- assertEquals(null, ParserUtils.getValueForArgument("-foo", args));
- }
}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java
index c3d9fa1f0..a8c503800 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java
@@ -25,7 +25,7 @@ public class NoRenamingLauncherIni extends AbstractFwkAdminTest {
}
public void testConfigFiles() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ParserUtilsTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ParserUtilsTest.java
new file mode 100644
index 000000000..88b77bc32
--- /dev/null
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ParserUtilsTest.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.frameworkadmin.tests;
+
+import java.io.File;
+import java.util.*;
+import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
+
+/**
+ * Tests for {@link ParserUtils}.
+ */
+public class ParserUtilsTest extends AbstractFwkAdminTest {
+
+ public ParserUtilsTest(String name) {
+ super(name);
+ }
+ public void testGetValueForArgument() throws Exception {
+ List args = new ArrayList();
+ args.add("-foo");
+ args.add("bar");
+ assertEquals( "bar", ParserUtils.getValueForArgument("-foo", args));
+
+ args.set(1, "-bar");
+ assertEquals(null, ParserUtils.getValueForArgument("-foo", args));
+ }
+
+ public void testRemoveArgument() throws Exception {
+ String [] args = new String [] { "-bar", "-foo", "-other"};
+ ParserUtils.removeArgument("-foo", Arrays.asList(args));
+ assertEquals(args, new String [] {"-bar", null, "-other"});
+
+ args = new String [] { "-bar", "-foo", "other"};
+ ParserUtils.removeArgument("-foo", Arrays.asList(args));
+ assertEquals(args, new String [] {"-bar", null, null});
+
+ args = new String [] { "-bar", "-foo", "s-pecial"};
+ ParserUtils.removeArgument("-foo", Arrays.asList(args));
+ assertEquals(args, new String [] {"-bar", null, null});
+ }
+
+ public void testSetValueForArgument() throws Exception {
+ List args = new ArrayList();
+ ParserUtils.setValueForArgument("-foo", "bar", args);
+ assertTrue(args.size() == 2);
+ assertEquals(args.get(0), "-foo");
+ assertEquals(args.get(1), "bar");
+
+ args.add("-other");
+ args.set(1, "s-pecial");
+ ParserUtils.setValueForArgument("-foo", "bas", args);
+ assertTrue(args.size() == 3);
+ assertEquals(args.get(0), "-foo");
+ assertEquals(args.get(1), "bas");
+ assertEquals(args.get(2), "-other");
+
+ args.remove(1);
+ ParserUtils.setValueForArgument("-foo", "bas", args);
+ assertTrue(args.size() == 3);
+ assertEquals(args.get(0), "-foo");
+ assertEquals(args.get(1), "bas");
+ assertEquals(args.get(2), "-other");
+ }
+
+ public void testFromOSGiJarToOSGiInstallArea() {
+ String path = "";
+ File result =ParserUtils.fromOSGiJarToOSGiInstallArea(path);
+ assertNotNull("1.0", result);
+
+ path = "osgi.jar";
+ result =ParserUtils.fromOSGiJarToOSGiInstallArea(path);
+ assertNotNull("1.0", result);
+ assertEquals("1.1", "", result.toString());
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java
index e5e279992..d0fb71596 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java
@@ -26,7 +26,7 @@ public class ReaderTest1 extends AbstractFwkAdminTest {
public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java
index 096e8087e..fac583e0e 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java
@@ -28,7 +28,7 @@ public class ReaderTest2 extends AbstractFwkAdminTest {
protected void setUp() throws Exception {
super.setUp();
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
installFolder = Activator.getContext().getDataFile(ReaderTest2.class.getName());
configurationFolder = new File(installFolder, "conf");
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java
index 772f2cd95..4def4fd63 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java
@@ -26,7 +26,7 @@ public class ReaderTest3 extends AbstractFwkAdminTest {
public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java
index 4440747ef..dd08dccdd 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java
@@ -29,7 +29,7 @@ public class ReaderTest4 extends AbstractFwkAdminTest {
protected void setUp() throws Exception {
super.setUp();
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
installFolder = Activator.getContext().getDataFile(ReaderTest4.class.getName());
configurationFolder = new File(installFolder, "conf");
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java
index bb834bf7d..8363f41df 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java
@@ -28,7 +28,7 @@ public class ReaderTest5 extends AbstractFwkAdminTest {
protected void setUp() throws Exception {
super.setUp();
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
installFolder = Activator.getContext().getDataFile(ReaderTest5.class.getName());
configurationFolder = new File(installFolder, "configuration");
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java
index 7247644f8..f41cc5d09 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java
@@ -26,7 +26,7 @@ public class ReaderTestBug267850 extends AbstractFwkAdminTest {
public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java
index eed733a57..2c1f0dd0f 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java
@@ -26,7 +26,7 @@ public class ReaderTestBug285935 extends AbstractFwkAdminTest {
public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java
index 2d44e96fe..c91be84d4 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java
@@ -25,7 +25,7 @@ public class RemovingAllBundles extends AbstractFwkAdminTest {
}
public void testConfigFiles() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java
index 9b83e0818..2ce33f91f 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java
@@ -25,7 +25,7 @@ public class RenamingLauncherIni extends AbstractFwkAdminTest {
}
public void testConfigFiles() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java
index 1af667f55..0bbf5e755 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java
@@ -22,7 +22,7 @@ public class SharedConfigurationTest extends AbstractFwkAdminTest {
}
public void testDefaultConfiguration() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
@@ -48,7 +48,7 @@ public class SharedConfigurationTest extends AbstractFwkAdminTest {
}
public void testSharedConfiguration() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
@@ -77,7 +77,7 @@ public class SharedConfigurationTest extends AbstractFwkAdminTest {
}
public void testNotSharedConfiguration() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java
index 4c8b2e71e..10af760d4 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java
@@ -25,7 +25,7 @@ public class SimpleConfiguratorTest extends AbstractFwkAdminTest {
}
public void testConfigFiles() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratormManipulator();
+ startSimpleConfiguratorManipulator();
FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
Manipulator manipulator = fwkAdmin.getManipulator();
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java
index c970c7d5c..c0c6228a5 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java
@@ -10,10 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.frameworkadmin.tests;
-import org.eclipse.core.runtime.Platform;
-
import java.io.File;
import java.io.IOException;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java
index 4ea79ed06..0841eb48b 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java
@@ -10,11 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.frameworkadmin.tests;
-import org.eclipse.osgi.service.environment.Constants;
-
import java.io.File;
import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
+import org.eclipse.osgi.service.environment.Constants;
public class UtilsTest extends AbstractFwkAdminTest {

Back to the top