diff options
author | Camille Letavernier | 2016-06-06 14:51:00 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2016-06-06 15:22:58 +0000 |
commit | 4757741b9958efeacb6d46efe74a2662701cca5f (patch) | |
tree | f40943554b9820eb7d719edc8095f69edaa4f24a /tests | |
parent | fc1f74a5e12f1ee4c69010abbe59fd4fb10b6fd7 (diff) | |
download | org.eclipse.papyrus-4757741b9958efeacb6d46efe74a2662701cca5f.tar.gz org.eclipse.papyrus-4757741b9958efeacb6d46efe74a2662701cca5f.tar.xz org.eclipse.papyrus-4757741b9958efeacb6d46efe74a2662701cca5f.zip |
Bug 494730: [Test] Regression for
org.eclipse.papyrus.infra.gmfdiag.common.tests.ExpansionAddLink.load_DiagramExpansion
https://bugs.eclipse.org/bugs/show_bug.cgi?id=494730
Change-Id: Ic68735e0fcc07691e278d5d3304ea55902f7a23c
Signed-off-by: Camille Letavernier <camille.letavernier@cea.fr>
Diffstat (limited to 'tests')
3 files changed, 56 insertions, 62 deletions
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests/models/AddLink.xmi b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests/models/AddLink.xmi index 539deff1adf..f1fd4f257c2 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests/models/AddLink.xmi +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests/models/AddLink.xmi @@ -13,9 +13,10 @@ name="library">
<representations
xsi:type="expansionmodel:Representation"
- editPartQualifiedName="org.eclipse.papyrus.uml.diagram.common.edit.part.DependencyEditPart"
+ editPartQualifiedName="org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyEditPart"
name="NewDependency"
viewFactory="org.eclipse.gmf.runtime.diagram.ui.view.factories.optimal.ConnectorViewFactory"
+ description=""
graphicalElementType="org.eclipse.papyrus.uml.diagram.testexpansion.Dependency_Link"/>
</libraries>
</expansionmodel:DiagramExpansion>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests/org.eclipse.papyrus.infra.gmfdiag.common.tests.launch b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests/org.eclipse.papyrus.infra.gmfdiag.common.tests.launch index 810026b8ee5..a3b5ff64683 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests/org.eclipse.papyrus.infra.gmfdiag.common.tests.launch +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests/org.eclipse.papyrus.infra.gmfdiag.common.tests.launch @@ -1,46 +1,46 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig"> -<booleanAttribute key="append.args" value="true"/> -<booleanAttribute key="askclear" value="false"/> -<booleanAttribute key="automaticAdd" value="true"/> -<booleanAttribute key="automaticValidate" value="false"/> -<stringAttribute key="bootstrap" value=""/> -<stringAttribute key="checked" value="org.eclipse.papyrus.infra.gmfdiag.common"/> -<booleanAttribute key="clearConfig" value="true"/> -<booleanAttribute key="clearws" value="true"/> -<booleanAttribute key="clearwslog" value="false"/> -<listAttribute key="com.mountainminds.eclemma.core.SCOPE_IDS"> -<listEntry value="=org.eclipse.papyrus.infra.gmfdiag.dnd/src"/> -<listEntry value="=org.eclipse.papyrus.infra.gmfdiag.common/src"/> -</listAttribute> -<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/> -<booleanAttribute key="default" value="true"/> -<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.infra.gmfdiag.common.tests/src/org/eclipse/papyrus/infra/gmfdiag/common/tests/AllTests.java"/> -</listAttribute> -<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> -<listEntry value="1"/> -</listAttribute> -<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> -<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"/> -<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> -<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.8"/> -<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.infra.gmfdiag.common.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.infra.gmfdiag.common.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 -Xmx1024m -XX:PermSize=256M -XX:MaxPermSize=512M -Doomph.setup.skip=true"/> -<stringAttribute key="pde.version" value="3.3"/> -<stringAttribute key="product" value="org.eclipse.platform.ide"/> -<booleanAttribute key="run_in_ui_thread" value="true"/> -<booleanAttribute key="show_selected_only" value="false"/> -<booleanAttribute key="tracing" value="true"/> -<booleanAttribute key="useCustomFeatures" value="false"/> -<booleanAttribute key="useDefaultConfig" value="true"/> -<booleanAttribute key="useDefaultConfigArea" value="false"/> -<booleanAttribute key="useProduct" value="true"/> -</launchConfiguration> +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="org.eclipse.papyrus.infra.gmfdiag.common"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<listAttribute key="com.mountainminds.eclemma.core.SCOPE_IDS">
+<listEntry value="=org.eclipse.papyrus.infra.gmfdiag.dnd/src"/>
+<listEntry value="=org.eclipse.papyrus.infra.gmfdiag.common/src"/>
+</listAttribute>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<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.infra.gmfdiag.common.tests/src/org/eclipse/papyrus/infra/gmfdiag/common/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<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"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<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.8"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.infra.gmfdiag.common.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.infra.gmfdiag.common.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.8 -Xms40m -Xmx1024m -Doomph.setup.skip=true"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="true"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests/src/org/eclipse/papyrus/infra/gmfdiag/common/tests/ExpansionAddLink.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests/src/org/eclipse/papyrus/infra/gmfdiag/common/tests/ExpansionAddLink.java index f2dec075b8a..94e246d1635 100644 --- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests/src/org/eclipse/papyrus/infra/gmfdiag/common/tests/ExpansionAddLink.java +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests/src/org/eclipse/papyrus/infra/gmfdiag/common/tests/ExpansionAddLink.java @@ -1,6 +1,6 @@ /***************************************************************************** * Copyright (c) 2015, 2016 CEA LIST, Christian W. Damus, 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 @@ -10,7 +10,7 @@ * CEA LIST - Initial API and implementation * Christian W. Damus - bug 485220 * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Bug 494730 - * + * *****************************************************************************/ package org.eclipse.papyrus.infra.gmfdiag.common.tests; @@ -50,7 +50,7 @@ import org.osgi.framework.FrameworkUtil; /** * this Test is used to test if it is possible to add compartment * see #Test T005-Add link - * + * * */ public class ExpansionAddLink extends AbstractEditorTest { @@ -75,15 +75,10 @@ public class ExpansionAddLink extends AbstractEditorTest { protected static final String NEW_DEPENDENCY_ELEMENTTYPE_ID = "org.eclipse.papyrus.uml.diagram.testexpansion.Dependency_Link"; @Test - public void load_DiagramExpansion() { - try { - // Bug 494730: open at first the diagram to loads all element types needed - initModel("ExpansionModelProject", "ExpansionModelTest", getBundle()); - openDiagram(editor, "NewDiagram"); - - } catch (Exception e) { - e.printStackTrace(); - } + public void load_DiagramExpansion() throws Exception { + // Bug 494730: open at first the diagram to loads all element types needed + initModel("ExpansionModelProject", "ExpansionModelTest", getBundle()); + openDiagram(editor, "NewDiagram"); // loading DiagramExpansionsRegistry diagramExpansionsRegistry = loadXMIExpansionModel("AddLink.xmi"); @@ -92,7 +87,6 @@ public class ExpansionAddLink extends AbstractEditorTest { // test the data structure that is interpreted by the framework ChildrenListRepresentation childrenListRepresentation = diagramExpansionsRegistry.mapChildreen.get(CLASS_DIAGRAM_TYPE); - System.out.println(childrenListRepresentation); Assert.assertNotNull("A usage contex has been defined for " + CLASS_DIAGRAM_TYPE, childrenListRepresentation); ElementTypeConfigurationTypeRegistry.getInstance(); Assert.assertNotNull("The Link of NewDependency has been added", childrenListRepresentation.IDMap.get(DEPENDENCY_HINT)); @@ -123,7 +117,6 @@ public class ExpansionAddLink extends AbstractEditorTest { org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart linkEditPart = (org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) diagramEditPart.getConnections().get(0); Assert.assertNotNull("linkEditPart edit Part must exist", linkEditPart); Assert.assertEquals("The link must have the type " + DEPENDENCY_HINT, DEPENDENCY_HINT, linkEditPart.getNotationView().getType()); - } public CreateConnectionViewRequest createConnectionViewRequest(IElementType type, EditPart source, EditPart target, DiagramEditPart diagramEditPart) { @@ -145,7 +138,7 @@ public class ExpansionAddLink extends AbstractEditorTest { DiagramExpansionsRegistry diagramExpansionsRegistry = DiagramExpansionSingleton.getInstance().getDiagramExpansionRegistry(); diagramExpansionsRegistry.clear(); Assert.assertEquals("Size ot the registry must be equals to 0", 0, diagramExpansionsRegistry.getDiagramExpansions().size()); - Assert.assertEquals("Size ot the map childreen must be equals to 0", 0, diagramExpansionsRegistry.mapChildreen.size()); + Assert.assertEquals("Size ot the map children must be equals to 0", 0, diagramExpansionsRegistry.mapChildreen.size()); URI badContextExpansion = URI.createPlatformPluginURI("org.eclipse.papyrus.infra.gmfdiag.common.tests", true); badContextExpansion = badContextExpansion.appendSegment("models"); badContextExpansion = badContextExpansion.appendSegment(filename); |