summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-08-18 11:01:49 (EDT)
committerCarsten Drossel2008-08-18 11:01:49 (EDT)
commit838dbd49613ab31fcd931cbb3c0a2c7c17dc8226 (patch)
tree5da67999b4eec8c5fefeb7e2b809a27c5b86e057
parent3bc8a4171c71e713143bfdb4f1b69426204ecafd (diff)
downloadorg.eclipse.riena-838dbd49613ab31fcd931cbb3c0a2c7c17dc8226.zip
org.eclipse.riena-838dbd49613ab31fcd931cbb3c0a2c7c17dc8226.tar.gz
org.eclipse.riena-838dbd49613ab31fcd931cbb3c0a2c7c17dc8226.tar.bz2
fixed test
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.java13
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.xml2
2 files changed, 11 insertions, 4 deletions
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.java
index d769928..291c736 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.java
@@ -11,13 +11,17 @@
package org.eclipse.riena.navigation.ui.swt.views;
import org.eclipse.riena.navigation.IApplicationModel;
+import org.eclipse.riena.navigation.IModuleNode;
import org.eclipse.riena.navigation.ISubModuleNode;
import org.eclipse.riena.navigation.model.ApplicationModel;
+import org.eclipse.riena.navigation.model.ModuleNode;
import org.eclipse.riena.navigation.model.NavigationNodeId;
import org.eclipse.riena.navigation.model.SubModuleNode;
+import org.eclipse.riena.navigation.ui.controllers.ModuleController;
import org.eclipse.riena.navigation.ui.controllers.SubModuleController;
import org.eclipse.riena.tests.RienaTestCase;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
/**
* Tests for the SubModuleNodeView.
@@ -33,7 +37,9 @@ public class SubModuleViewTest extends RienaTestCase {
addPluginXml(SubModuleViewTest.class, "SubModuleViewTest.xml");
subModuleNodeView = new TestView();
- node = new SubModuleNode(new NavigationNodeId("testId")) {
+ node = new SubModuleNode(new NavigationNodeId("testId"), "TestSubModuleLabel");
+
+ IModuleNode parent = new ModuleNode(null, "TestModuleLabel") {
@Override
public <T> T getTypecastedAdapter(Class<T> clazz) {
if (clazz.equals(IApplicationModel.class)) {
@@ -42,12 +48,13 @@ public class SubModuleViewTest extends RienaTestCase {
return null;
}
};
- node.setLabel("Test");
+ parent.setPresentation(new ModuleController(parent));
+ parent.addChild(node);
}
public void testCreateController() throws Exception {
- subModuleNodeView.createPartControl(null);
+ subModuleNodeView.createPartControl(new Shell());
assertTrue(subModuleNodeView.getController() instanceof SubModuleController);
assertEquals(node, subModuleNodeView.getController().getNavigationNode());
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.xml b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.xml
index bba4f32..6d2a356 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.xml
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/navigation/ui/swt/views/SubModuleViewTest.xml
@@ -2,7 +2,7 @@
<?eclipse version="3.2"?>
<plugin>
<extension
- point="org.eclipse.riena.navigation.SubModuleType">
+ point="org.eclipse.riena.navigation.subModuleType">
<subModuleType
typeId="testId"
view="org.eclipse.riena.navigation.ui.swt.views.TestView"