diff options
author | Nicolas FAUVERGUE | 2016-05-04 12:37:16 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2016-05-12 14:15:36 +0000 |
commit | efeca3c6b32becad454cc87f21a34f5377ce5b7e (patch) | |
tree | 1a62ce877e5c9334905a875b23ce400b1a368e65 | |
parent | 260d8dac6c27e3fbdd0fd976f23d07306d8b7366 (diff) | |
download | org.eclipse.papyrus-efeca3c6b32becad454cc87f21a34f5377ce5b7e.tar.gz org.eclipse.papyrus-efeca3c6b32becad454cc87f21a34f5377ce5b7e.tar.xz org.eclipse.papyrus-efeca3c6b32becad454cc87f21a34f5377ce5b7e.zip |
Bug 439501: [Table][Requirement] Reordering of requirements reverts to
initial ordering https://bugs.eclipse.org/bugs/show_bug.cgi?id=439501
JUnit test.
Change-Id: Ife7e5135c1577ba1fa6adf240eb749bbbf3c73e0
Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@all4tec.net>
5 files changed, 289 insertions, 0 deletions
diff --git a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.di b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.di new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.notation b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.notation new file mode 100644 index 00000000000..0c25ed3b423 --- /dev/null +++ b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.notation @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration" xmi:id="_-R9B0BHvEeabc_zdDAmbEg" name="RequirementTable0" currentRowAxisProvider="_-R9B1RHvEeabc_zdDAmbEg" currentColumnAxisProvider="_-R9B0RHvEeabc_zdDAmbEg"> + <context xmi:type="uml:Model" href="RequirementsReordering.uml#_U8kqgBHuEeabc_zdDAmbEg"/> + <owner xmi:type="uml:Model" href="RequirementsReordering.uml#_U8kqgBHuEeabc_zdDAmbEg"/> + <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirementTable.configuration#_lTE0gHDwEeWh-MssWmCB_A"/> + <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/> + <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_-R9B0RHvEeabc_zdDAmbEg" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider"> + <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_-R9B0hHvEeabc_zdDAmbEg" element="property_of_stereotype:/SysML::Requirements::Requirement::id"> + <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/> + </axis> + <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_-R9B0xHvEeabc_zdDAmbEg"> + <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/> + <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/> + </axis> + <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_-R9B1BHvEeabc_zdDAmbEg" element="property_of_stereotype:/SysML::Requirements::Requirement::text"> + <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/> + </axis> + </columnAxisProvidersHistory> + <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_-R9B1RHvEeabc_zdDAmbEg" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/> +</nattable:Table> diff --git a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.uml b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.uml new file mode 100644 index 00000000000..ac3b5909fb7 --- /dev/null +++ b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/bugs/bug439501/RequirementsReordering.uml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"> + <uml:Model xmi:id="_U8kqgBHuEeabc_zdDAmbEg" name="RootElement"> + <packagedElement xmi:type="uml:Class" xmi:id="_6o5QcBHvEeabc_zdDAmbEg" name="Requirement1"/> + <packagedElement xmi:type="uml:Class" xmi:id="_8Jij0BHvEeabc_zdDAmbEg" name="Requirement2"/> + <packagedElement xmi:type="uml:Class" xmi:id="_8mV0kBHvEeabc_zdDAmbEg" name="Requirement3"/> + <packagedElement xmi:type="uml:Class" xmi:id="_9JvckBHvEeabc_zdDAmbEg" name="Requirement4"/> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKVZsBHuEeabc_zdDAmbEg"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKX18BHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/> + </profileApplication> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKaSMBHuEeabc_zdDAmbEg"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKa5QBHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/> + </profileApplication> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKdVgBHuEeabc_zdDAmbEg"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKdVgRHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/> + </profileApplication> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKd8kBHuEeabc_zdDAmbEg"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKgY0BHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/> + </profileApplication> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKg_4BHuEeabc_zdDAmbEg"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKhm8BHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/> + </profileApplication> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKiOABHuEeabc_zdDAmbEg"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKi1EBHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/> + </profileApplication> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKjcIBHuEeabc_zdDAmbEg"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKjcIRHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/> + </profileApplication> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKlRUBHuEeabc_zdDAmbEg"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKl4YBHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/> + </profileApplication> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKntkBHuEeabc_zdDAmbEg"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKoUoBHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/> + </profileApplication> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKo7sBHuEeabc_zdDAmbEg"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKo7sRHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/> + </profileApplication> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_VKpiwBHuEeabc_zdDAmbEg"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VKqJ0BHuEeabc_zdDAmbEg" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/> + </profileApplication> + </uml:Model> + <Requirements:Requirement xmi:id="_6pLkUBHvEeabc_zdDAmbEg" base_Class="_6o5QcBHvEeabc_zdDAmbEg"/> + <Requirements:Requirement xmi:id="_8JoqcBHvEeabc_zdDAmbEg" base_Class="_8Jij0BHvEeabc_zdDAmbEg"/> + <Requirements:Requirement xmi:id="_8mb7MBHvEeabc_zdDAmbEg" base_Class="_8mV0kBHvEeabc_zdDAmbEg"/> + <Requirements:Requirement xmi:id="_9JvckRHvEeabc_zdDAmbEg" base_Class="_9JvckBHvEeabc_zdDAmbEg"/> +</xmi:XMI> diff --git a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/RequirementReorderingTest.java b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/RequirementReorderingTest.java new file mode 100644 index 00000000000..406ec9290c2 --- /dev/null +++ b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/bugs/RequirementReorderingTest.java @@ -0,0 +1,184 @@ +/***************************************************************************** + * Copyright (c) 2016 CEA LIST 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs; + +import java.util.List; + +import org.eclipse.emf.edit.command.MoveCommand; +import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager; +import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor; +import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager; +import org.eclipse.papyrus.infra.nattable.model.nattable.Table; +import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest; +import org.eclipse.papyrus.junit.utils.TableUtils; +import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.ui.IEditorPart; +import org.eclipse.uml2.uml.Model; +import org.eclipse.uml2.uml.NamedElement; +import org.eclipse.uml2.uml.UMLPackage; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; + +/** + * This allow to define the tests for the requirement reodering. + */ +@PluginResource("resources/bugs/bug439501/RequirementsReordering.di") +public class RequirementReorderingTest extends AbstractPapyrusTest { + + /** + * The table name. + */ + private static final String TABLE_NAME = "RequirementTable0"; //$NON-NLS-1$ + + /** + * The first requirement name. + */ + private static final String REQUIREMENT_1 = "Requirement1"; //$NON-NLS-1$ + + /** + * The second requirement name. + */ + private static final String REQUIREMENT_2 = "Requirement2"; //$NON-NLS-1$ + + /** + * The third requirement name. + */ + private static final String REQUIREMENT_3 = "Requirement3"; //$NON-NLS-1$ + + /** + * The fourth requirement name. + */ + private static final String REQUIREMENT_4 = "Requirement4"; //$NON-NLS-1$ + + + /** + * The papyrus fixture. + */ + @Rule + public final PapyrusEditorFixture fixture = new PapyrusEditorFixture(); + + /** + * The model reference. + */ + protected Model model; + + /** + * Constructor. + */ + public RequirementReorderingTest() { + super(); + } + + /** + * This allow to initialize the tests. + */ + @Before + public void init() { + model = (Model) fixture.getModel(); + Assert.assertNotNull("RootModel is null", model); //$NON-NLS-1$ + + // Get the table and open it + Table mainTable = TableUtils.getNotationFirstTable(fixture.getModelSet(), TABLE_NAME); + fixture.getPageManager().openPage(mainTable); + fixture.flushDisplayEvents(); + } + + /** + * The test for the requirements reordering. + * + * @throws Exception + * The exception. + */ + @Test + public void testRequirementsReordering() throws Exception { + // Open the table and get the manager + final IPageManager pageManager = fixture.getPageManager(); + final List<Object> pages = pageManager.allPages(); + pageManager.openPage(pages.get(0)); + final IEditorPart part = fixture.getEditor().getActiveEditor(); + Assert.assertTrue(part instanceof NatTableEditor); + final NatTableEditor editor = (NatTableEditor) part; + final INattableModelManager currentManager = (INattableModelManager) editor.getAdapter(INattableModelManager.class); + Assert.assertTrue(currentManager instanceof INattableModelManager); + + // check initial data + checkInitialData(currentManager); + + final MoveCommand moveCommand = new MoveCommand(editor.getEditingDomain(), model, UMLPackage.eINSTANCE.getPackage_PackagedElement(), 1, 3); + editor.getEditingDomain().getCommandStack().execute(moveCommand); + fixture.flushDisplayEvents(); + + // Check modified data + checkModifiedData(currentManager); + + editor.getEditingDomain().getCommandStack().undo(); + fixture.flushDisplayEvents(); + + // Check initial data + checkInitialData(currentManager); + + editor.getEditingDomain().getCommandStack().redo(); + fixture.flushDisplayEvents(); + + // Check modified data + checkModifiedData(currentManager); + } + + /** + * This allows to check the initial table data. + * + * @param currentManager + * The nattable model manager. + */ + protected void checkInitialData(final INattableModelManager currentManager) { + final List<Object> rowElements = currentManager.getRowElementsList(); + + final Object firstRowRepresentedElement = rowElements.get(0); + Assert.assertEquals("The first row element is not the expected one", REQUIREMENT_1, ((NamedElement) firstRowRepresentedElement).getName()); //$NON-NLS-1$ + + final Object secondRowRepresentedElement = rowElements.get(1); + Assert.assertEquals("The second row element is not the expected one", REQUIREMENT_2, ((NamedElement) secondRowRepresentedElement).getName()); //$NON-NLS-1$ + + final Object thirdRowRepresentedElement = rowElements.get(2); + Assert.assertEquals("The third row element is not the expected one", REQUIREMENT_3, ((NamedElement) thirdRowRepresentedElement).getName()); //$NON-NLS-1$ + + final Object fourthRowRepresentedElement = rowElements.get(3); + Assert.assertEquals("The fourth row element is not the expected one", REQUIREMENT_4, ((NamedElement) fourthRowRepresentedElement).getName()); //$NON-NLS-1$ + } + + /** + * This allows to check the modified table data. + * + * @param currentManager + * The nattable model manager. + */ + protected void checkModifiedData(final INattableModelManager currentManager) { + final List<Object> rowElements = currentManager.getRowElementsList(); + + final Object firstRowRepresentedElement = rowElements.get(0); + Assert.assertEquals("The first row element is not the expected one", REQUIREMENT_1, ((NamedElement) firstRowRepresentedElement).getName()); //$NON-NLS-1$ + + final Object secondRowRepresentedElement = rowElements.get(1); + Assert.assertEquals("The second row element is not the expected one", REQUIREMENT_3, ((NamedElement) secondRowRepresentedElement).getName()); //$NON-NLS-1$ + + final Object thirdRowRepresentedElement = rowElements.get(2); + Assert.assertEquals("The third row element is not the expected one", REQUIREMENT_4, ((NamedElement) thirdRowRepresentedElement).getName()); //$NON-NLS-1$ + + final Object fourthRowRepresentedElement = rowElements.get(3); + Assert.assertEquals("The fourth row element is not the expected one", REQUIREMENT_2, ((NamedElement) fourthRowRepresentedElement).getName()); //$NON-NLS-1$ + } +} diff --git a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/AllTests.java b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/AllTests.java index 04c90262bb5..bc98386cabc 100755 --- a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/AllTests.java +++ b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/AllTests.java @@ -16,6 +16,7 @@ import org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs.AxisChangeIndex import org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs.AxisChangeIndexWithoutConfigurationTest; import org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs.InvertedAxisChangeIndexWithConfigurationTest; import org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs.InvertedAxisChangeIndexWithoutConfigurationTest; +import org.eclipse.papyrus.sysml.nattable.requirement.tests.bugs.RequirementReorderingTest; import org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile.ImportCellsAll_Test; import org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile.ImportEmptyAddAll_Test; import org.eclipse.papyrus.sysml.nattable.requirement.tests.importfile.ImportEmptyReplaceAll_Test; @@ -77,6 +78,9 @@ import org.junit.runners.Suite.SuiteClasses; OpenTableTest.class, TableCreationInUMLModel.class, RevealRequirementTableTest.class, + + // Bug 439501: Test the requirements reordering + RequirementReorderingTest.class, // Paste Overwrite tests PasteEmptyClipboard_Test.class, |