Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-03-03 23:03:19 +0000
committerslewis2009-03-03 23:03:19 +0000
commitca037c36e12bf7bb3925f24315b116739608be3a (patch)
tree3b559007c3dc464765aa55a2ed7580b5edb4ada0 /tests/bundles/org.eclipse.ecf.tests
parent43d5ec077d00e3e7fd9a1256603ce70048eb8723 (diff)
downloadorg.eclipse.ecf-ca037c36e12bf7bb3925f24315b116739608be3a.tar.gz
org.eclipse.ecf-ca037c36e12bf7bb3925f24315b116739608be3a.tar.xz
org.eclipse.ecf-ca037c36e12bf7bb3925f24315b116739608be3a.zip
Correct tests for adapter types. Added test for new IContainerManager API (removeContainer(ID), removeAllContainers())
Diffstat (limited to 'tests/bundles/org.eclipse.ecf.tests')
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests/.classpath2
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests/.settings/org.eclipse.jdt.core.prefs6
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests/META-INF/MANIFEST.MF4
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerFactoryCreateTest.java6
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerFactoryServiceCreateTest.java6
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerManagerServiceTest.java9
6 files changed, 23 insertions, 10 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests/.classpath b/tests/bundles/org.eclipse.ecf.tests/.classpath
index c2ce266a6..6f3b481ac 100755
--- a/tests/bundles/org.eclipse.ecf.tests/.classpath
+++ b/tests/bundles/org.eclipse.ecf.tests/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.0%Foundation-1.0"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/tests/bundles/org.eclipse.ecf.tests/.settings/org.eclipse.jdt.core.prefs b/tests/bundles/org.eclipse.ecf.tests/.settings/org.eclipse.jdt.core.prefs
index b0cc35f43..5f673c93a 100755
--- a/tests/bundles/org.eclipse.ecf.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/bundles/org.eclipse.ecf.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,9 +1,9 @@
-#Fri Feb 13 10:11:31 PST 2009
+#Tue Mar 03 14:34:45 PST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.3
+org.eclipse.jdt.core.compiler.compliance=1.4
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
diff --git a/tests/bundles/org.eclipse.ecf.tests/META-INF/MANIFEST.MF b/tests/bundles/org.eclipse.ecf.tests/META-INF/MANIFEST.MF
index 60d7bc2e9..8f34185e5 100755
--- a/tests/bundles/org.eclipse.ecf.tests/META-INF/MANIFEST.MF
+++ b/tests/bundles/org.eclipse.ecf.tests/META-INF/MANIFEST.MF
@@ -20,5 +20,5 @@ Import-Package: org.eclipse.osgi.util;version="1.1.0",
org.osgi.framework;version="1.4.0",
org.osgi.util.tracker;version="1.3.2"
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,
- J2SE-1.3
+Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
+ J2SE-1.4
diff --git a/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerFactoryCreateTest.java b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerFactoryCreateTest.java
index c7bfa917d..d1e57ee9d 100755
--- a/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerFactoryCreateTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerFactoryCreateTest.java
@@ -11,6 +11,8 @@
package org.eclipse.ecf.tests.core;
+import java.util.Arrays;
+
import org.eclipse.ecf.core.AbstractContainer;
import org.eclipse.ecf.core.ContainerConnectException;
import org.eclipse.ecf.core.ContainerCreateException;
@@ -200,8 +202,8 @@ public class ContainerFactoryCreateTest extends ContainerFactoryAbstractTestCase
public void testContainerTypeDescriptionGetSupportedAdapterTypes() {
final ContainerTypeDescription desc = ContainerFactory.getDefault().getDescriptionByName(CONTAINER_TYPE_NAME);
final String[] adapterTypes = desc.getSupportedAdapterTypes();
- assertTrue(adapterTypes.length == 1);
- assertTrue(adapterTypes[0] == "one");
+ assertTrue(adapterTypes.length > 0);
+ assertTrue(Arrays.asList(adapterTypes).contains("one"));
}
public void testContainerTypeDescriptionGetSupportedParemeterTypes() {
diff --git a/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerFactoryServiceCreateTest.java b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerFactoryServiceCreateTest.java
index 1d2d001ad..f03fb5c55 100755
--- a/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerFactoryServiceCreateTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerFactoryServiceCreateTest.java
@@ -11,6 +11,8 @@
package org.eclipse.ecf.tests.core;
+import java.util.Arrays;
+
import org.eclipse.ecf.core.AbstractContainer;
import org.eclipse.ecf.core.ContainerConnectException;
import org.eclipse.ecf.core.ContainerCreateException;
@@ -201,8 +203,8 @@ public class ContainerFactoryServiceCreateTest extends ContainerFactoryServiceAb
public void testContainerTypeDescriptionGetSupportedAdapterTypes() {
final ContainerTypeDescription desc = getContainerFactoryService().getDescriptionByName(CONTAINER_TYPE_NAME);
final String[] adapterTypes = desc.getSupportedAdapterTypes();
- assertTrue(adapterTypes.length == 1);
- assertTrue(adapterTypes[0] == "one");
+ assertTrue(adapterTypes.length > 0);
+ assertTrue(Arrays.asList(adapterTypes).contains("one"));
}
public void testContainerTypeDescriptionGetSupportedParemeterTypes() {
diff --git a/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerManagerServiceTest.java b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerManagerServiceTest.java
index 722404c60..b310f76a4 100755
--- a/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerManagerServiceTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests/src/org/eclipse/ecf/tests/core/ContainerManagerServiceTest.java
@@ -176,5 +176,14 @@ public class ContainerManagerServiceTest extends ContainerFactoryServiceAbstract
}
}
+ public void testClearContainers() throws Exception {
+ IContainer [] c = createContainers(10);
+ assertNotNull(c);
+ containerManager.removeAllContainers();
+ IContainer [] cs = containerManager.getAllContainers();
+ assertTrue(cs != null);
+ assertTrue(cs.length == 0);
+ }
+
}

Back to the top