Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrschnekenbu2013-03-21 06:51:54 -0400
committerrschnekenbu2013-03-21 06:51:54 -0400
commit2aa127547a1c7cf8ae16a847eea2cc107a655ba2 (patch)
treed426990ef7547f3d58b7c3f027ecf45f423858cb /tests/junit/plugins/core
parentc08798d7804f2a2ae3b257e591fcb81d3fb66a33 (diff)
downloadorg.eclipse.papyrus-2aa127547a1c7cf8ae16a847eea2cc107a655ba2.tar.gz
org.eclipse.papyrus-2aa127547a1c7cf8ae16a847eea2cc107a655ba2.tar.xz
org.eclipse.papyrus-2aa127547a1c7cf8ae16a847eea2cc107a655ba2.zip
404005: [Views] Papyrus outline should correspond to current editor view
https://bugs.eclipse.org/bugs/show_bug.cgi?id=404005
Diffstat (limited to 'tests/junit/plugins/core')
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/org.eclipse.papyrus.infra.core.tests.launch (renamed from tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/org.eclipse.papyrus.core.tests.launch)8
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/contentoutline/NestedEditorDelegatedOutlinePageTest.java44
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/tests/AllTests.java2
3 files changed, 51 insertions, 3 deletions
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/org.eclipse.papyrus.core.tests.launch b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/org.eclipse.papyrus.infra.core.tests.launch
index 9732ba767e9..570dd9717f8 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/org.eclipse.papyrus.core.tests.launch
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/org.eclipse.papyrus.infra.core.tests.launch
@@ -14,7 +14,7 @@
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.papyrus.core.tests/test/org/eclipse/papyrus/infra/core/tests/AllTests.java"/>
+<listEntry value="/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/tests/AllTests.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
@@ -23,11 +23,13 @@
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.infra.core.tests.AllTests"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.core.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.infra.core.tests"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx512m"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms768m -Xmx1024m -XX:PermSize=256M -XX:MaxPermSize=512M"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/contentoutline/NestedEditorDelegatedOutlinePageTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/contentoutline/NestedEditorDelegatedOutlinePageTest.java
new file mode 100644
index 00000000000..08a953e175d
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/contentoutline/NestedEditorDelegatedOutlinePageTest.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.core.contentoutline;
+
+import static org.junit.Assert.*;
+
+import java.lang.reflect.Field;
+
+import org.eclipse.ui.part.PageSite;
+import org.junit.Test;
+
+
+/**
+ * Test the {@link NestedEditorDelegatedOutlinePage} class
+ */
+public class NestedEditorDelegatedOutlinePageTest {
+
+ @Test
+ public void testExistingMethod() {
+ // usage of java reflexive API to get a field. check this field is still present.
+ Field parentSiteField = null;
+ try {
+ parentSiteField = PageSite.class.getDeclaredField("parentSite");
+ parentSiteField.setAccessible(true);
+ } catch (SecurityException e) {
+ fail(e.getLocalizedMessage());
+ } catch (NoSuchFieldException e) {
+ fail(e.getLocalizedMessage());
+ }
+
+ assertNotNull("Impossible to find parent site field", parentSiteField);
+ }
+
+}
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/tests/AllTests.java
index 48d27dfc803..f58eb017bb5 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/tests/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/tests/AllTests.java
@@ -11,6 +11,7 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.core.tests;
+import org.eclipse.papyrus.infra.core.contentoutline.NestedEditorDelegatedOutlinePageTest;
import org.eclipse.papyrus.infra.core.lifecycleevents.LifeCycleEventsProviderTest;
import org.eclipse.papyrus.infra.core.resource.AbstractModelWithSharedResourceTest;
import org.eclipse.papyrus.infra.core.resource.ModelSetTest;
@@ -30,6 +31,7 @@ ModelSetTest.class, AbstractModelWithSharedResourceTest.class,
ComposedServiceTest.class, ServicesRegistryTest.class,
// {oep}.core.lifecycleevents
/* SaveAndDirtyServiceTest.class, */LifeCycleEventsProviderTest.class,
+NestedEditorDelegatedOutlinePageTest.class,
})
/**
* Suite Class for all tests in the plugin

Back to the top