summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.riena.tests/src')
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ExtensionUtilTest.java27
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ITest.java2
2 files changed, 26 insertions, 3 deletions
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ExtensionUtilTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ExtensionUtilTest.java
index 027c041..731fb41 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ExtensionUtilTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ExtensionUtilTest.java
@@ -10,6 +10,9 @@
*******************************************************************************/
package org.eclipse.riena.core.extension.util;
+import java.util.ArrayList;
+import java.util.HashMap;
+
import org.eclipse.riena.tests.RienaTestCase;
public class ExtensionUtilTest extends RienaTestCase {
@@ -18,8 +21,26 @@ public class ExtensionUtilTest extends RienaTestCase {
System.out.println("test");
ITest[] tests = ExtensionUtility.readExtensions("core.test.extpoint", ITest.class);
assertNotNull(tests);
- assertTrue(tests[0].getString().equals("test1"));
- assertTrue(tests[0].getBoolean());
- assertTrue(tests[0].createExecutable() instanceof String);
+ assertTrue("tests.length should be 3 but is " + tests.length, tests.length == 3);
+ for (ITest test : tests) {
+ assertNotNull(test.getString());
+ if (test.getString().equals("test1")) {
+ assertTrue(test.getBoolean());
+ assertTrue(test.isBoolean());
+ assertTrue(test.createExecutable() instanceof String);
+ } else {
+ if (test.getString().equals("test2")) {
+ assertFalse(test.getBoolean());
+ assertFalse(test.isBoolean());
+ assertTrue(test.createExecutable() instanceof HashMap);
+ } else {
+ if (test.getString().equals("test3")) {
+ assertTrue(test.getBoolean());
+ assertTrue(test.isBoolean());
+ assertTrue(test.createExecutable() instanceof ArrayList);
+ }
+ }
+ }
+ }
}
}
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ITest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ITest.java
index fb7218a..a820bd7 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ITest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/core/extension/util/ITest.java
@@ -16,6 +16,8 @@ public interface ITest {
boolean getBoolean();
+ boolean isBoolean();
+
Object createExecutable();
}