Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2015-11-19 11:27:53 -0500
committervincent lorenzo2016-01-12 11:47:54 -0500
commit9fe3f6fd85b03f0661569bc6644cabcbe7ed27f3 (patch)
tree4e2acb39fe521bc2e0513c6de7756104e0f85861 /tests
parent4daac505093ce077870d47de69c05f4295fa5ee3 (diff)
downloadorg.eclipse.papyrus-9fe3f6fd85b03f0661569bc6644cabcbe7ed27f3.tar.gz
org.eclipse.papyrus-9fe3f6fd85b03f0661569bc6644cabcbe7ed27f3.tar.xz
org.eclipse.papyrus-9fe3f6fd85b03f0661569bc6644cabcbe7ed27f3.zip
Bug 481023: [Table] [ClassTreeTable]
java.lang.UnsupportedOperationException: https://bugs.eclipse.org/bugs/show_bug.cgi?id=481023 The check if the expanded elements was not the correct one. Change-Id: I5172e1fe8a053b4260e862f588a9861609ee542c Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@all4tec.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481023/RequirementsNestedClassifier.di2
-rw-r--r--tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481023/RequirementsNestedClassifier.notation43
-rw-r--r--tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481023/RequirementsNestedClassifier.uml13
-rw-r--r--tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/bugs/RequirementsNestedClassifier.java204
-rw-r--r--tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/tests/AllTests.java4
5 files changed, 266 insertions, 0 deletions
diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481023/RequirementsNestedClassifier.di b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481023/RequirementsNestedClassifier.di
new file mode 100644
index 00000000000..bf9abab340f
--- /dev/null
+++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481023/RequirementsNestedClassifier.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/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481023/RequirementsNestedClassifier.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481023/RequirementsNestedClassifier.notation
new file mode 100644
index 00000000000..cb98b4b2b51
--- /dev/null
+++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481023/RequirementsNestedClassifier.notation
@@ -0,0 +1,43 @@
+<?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:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattablestyle="http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle" 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 http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider http://www.eclipse.org/papyrus/nattable/model#//nattablelabelprovider http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle http://www.eclipse.org/papyrus/nattable/model#//nattablestyle" xmi:id="_nRWBII7CEeW-WMYGxs4DXg" name="ClassTreeTable0" currentRowAxisProvider="_nRWBI47CEeW-WMYGxs4DXg" currentColumnAxisProvider="_nRWBIY7CEeW-WMYGxs4DXg">
+ <styles xmi:type="nattablestyle:TableDisplayStyle" xmi:id="_qQzb4I7CEeW-WMYGxs4DXg" displayStyle="HIERARCHIC_MULTI_TREE_COLUMN"/>
+ <context xmi:type="uml:Model" href="RequirementsNestedClassifier.uml#_oxW30I7BEeW-WMYGxs4DXg"/>
+ <owner xmi:type="uml:Model" href="RequirementsNestedClassifier.uml#_oxW30I7BEeW-WMYGxs4DXg"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/classTreeTable.configuration#_P3J1cEr7EeSVGbM3cmVSqQ"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_nRWBIY7CEeW-WMYGxs4DXg" description="This axis provider provides available columns according to the rows of the table (features of the object displayed on the other axis)" name="UML Feature axis provider">
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_nRWBIo7CEeW-WMYGxs4DXg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_nRWBI47CEeW-WMYGxs4DXg" description="This axis provider manages the rows, according to the wanted hierarchy" name="HierarchicalRowaAxisManager" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_sWn44I7CEeW-WMYGxs4DXg" indexStyle="NUMERIC">
+ <styles xmi:type="nattablestyle:IntValueStyle" xmi:id="_sWof8I7CEeW-WMYGxs4DXg" name="rowLabelWidth" intValue="140"/>
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_eLOfQI7EEeW-WMYGxs4DXg" pasteConfiguration="_eLPGUI7EEeW-WMYGxs4DXg" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_eLOfQY7EEeW-WMYGxs4DXg" alias="Class">
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ </axisUsedAsAxisProvider>
+ <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_eLOfQo7EEeW-WMYGxs4DXg" pasteConfiguration="_eLPGUo7EEeW-WMYGxs4DXg" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_eLOfQ47EEeW-WMYGxs4DXg" alias="">
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/>
+ </axisUsedAsAxisProvider>
+ <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_eLPGUI7EEeW-WMYGxs4DXg" pastedElementId="org.eclipse.papyrus.uml.Class">
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ <axisIdentifier xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_eLPGUY7EEeW-WMYGxs4DXg">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axisIdentifier>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_eLPGUo7EEeW-WMYGxs4DXg" pastedElementId="org.eclipse.papyrus.uml.Class">
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/>
+ </ownedAxisConfigurations>
+ <axisManagerConfigurations xmi:type="nattableaxisconfiguration:AxisManagerConfiguration" xmi:id="_eLN4MI7EEeW-WMYGxs4DXg" localSpecificConfigurations="_eLOfQI7EEeW-WMYGxs4DXg _eLOfQo7EEeW-WMYGxs4DXg">
+ <axisManager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.clazz.config/configs/class_synchronized_tree.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ </axisManagerConfigurations>
+ </localRowHeaderAxisConfiguration>
+</nattable:Table>
diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481023/RequirementsNestedClassifier.uml b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481023/RequirementsNestedClassifier.uml
new file mode 100644
index 00000000000..814eae6d45b
--- /dev/null
+++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481023/RequirementsNestedClassifier.uml
@@ -0,0 +1,13 @@
+<?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="_oxW30I7BEeW-WMYGxs4DXg" name="RootElement">
+ <packagedElement xmi:type="uml:Class" xmi:id="_rbPxkI7JEeWx-7Nn3LdonQ" name="Requirement1"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_o2jg5I7BEeW-WMYGxs4DXg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_o2kH8I7BEeW-WMYGxs4DXg" 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>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_rkbiwI7JEeWx-7Nn3LdonQ" base_Class="_rbPxkI7JEeWx-7Nn3LdonQ"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/bugs/RequirementsNestedClassifier.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/bugs/RequirementsNestedClassifier.java
new file mode 100644
index 00000000000..aaa64822fcd
--- /dev/null
+++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/bugs/RequirementsNestedClassifier.java
@@ -0,0 +1,204 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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.uml.nattable.clazz.config.tests.bugs;
+
+import java.util.List;
+
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.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.manager.table.ITreeNattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectTreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration;
+import org.eclipse.papyrus.infra.nattable.tree.CollapseAndExpandActionsEnum;
+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.Class;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * This allows to test the creation of a nested classifier requirement and its display in the table.
+ */
+@PluginResource("resources/bugs/bug481023/RequirementsNestedClassifier.di")
+public class RequirementsNestedClassifier {
+
+ /**
+ * The papyrus editor fixture.
+ */
+ @Rule
+ public final PapyrusEditorFixture fixture = new PapyrusEditorFixture();
+
+ /**
+ * the nattable editor
+ */
+ private NatTableEditor editor;
+
+ /**
+ * the tree table manager
+ */
+ private ITreeNattableModelManager manager;
+
+ /**
+ * The root element.
+ */
+ private Package root;
+
+ /**
+ * The existing requirement.
+ */
+ private Class requirement1;
+
+ /**
+ * The nested classifier requirement to create.
+ */
+ private Class nestedClassifierRequirement1;
+
+ /**
+ * The name of the existing requirement.
+ */
+ private static final String REQUIREMENT_1 = "Requirement1"; //$NON-NLS-1$
+
+ /**
+ * The name of the nested requirement to create.
+ */
+ private static final String NESTED_REQUIREMENT_1 = "NestedRequirement1"; //$NON-NLS-1$
+
+ /**
+ * Load the table editor
+ */
+ @Before
+ public void init() {
+ // Get the first
+ IPageManager pageManager = fixture.getPageManager();
+ List<Object> pages = pageManager.allPages();
+ pageManager.openPage(pages.get(0));
+ IEditorPart part = fixture.getEditor().getActiveEditor();
+ Assert.assertTrue(part instanceof NatTableEditor);
+ this.editor = (NatTableEditor) part;
+ INattableModelManager m = (INattableModelManager) editor.getAdapter(INattableModelManager.class);
+ Assert.assertTrue(m instanceof ITreeNattableModelManager);
+ this.manager = (ITreeNattableModelManager) m;
+
+ // Get the needed elements in the table
+ final EObject context = this.manager.getTable().getContext();
+ Assert.assertTrue(context instanceof Package);
+ this.root = (Package) context;
+ this.requirement1 = (Class) this.root.getMember(REQUIREMENT_1);
+ Assert.assertNotNull(requirement1);
+ }
+
+ /**
+ * This allows to test the creation of nested classifier requirement.
+ *
+ * @throws Exception
+ * The exception.
+ */
+ @Test
+ public void testNestedClassifierRequirement() throws Exception {
+
+ // Create a class for the requirement nestedClass
+ nestedClassifierRequirement1 = UMLFactory.eINSTANCE.createClass();
+ nestedClassifierRequirement1.setName(NESTED_REQUIREMENT_1);
+
+ // Create a requirement as nested classifier
+ final CompoundCommand compoundCommand = new CompoundCommand("Add class with requirement stereotype"); //$NON-NLS-1$
+ final TransactionalEditingDomain editingDomain = fixture.getEditingDomain();
+ compoundCommand.append(AddCommand.create(editingDomain, requirement1, UMLPackage.Literals.CLASS__NESTED_CLASSIFIER, nestedClassifierRequirement1));
+ final Stereotype requirement = (Stereotype) root.getProfileApplications().get(0).getAppliedProfile().getPackagedElement("Requirement"); //$NON-NLS-1$
+ compoundCommand.append(new RecordingCommand(editingDomain) {
+ public void doExecute() {
+ nestedClassifierRequirement1.applyStereotype(requirement);
+ }
+ });
+ editingDomain.getCommandStack().execute(compoundCommand);
+
+ // Expand the table
+ manager.doCollapseExpandAction(CollapseAndExpandActionsEnum.EXPAND_ALL, null);
+ fixture.flushDisplayEvents();
+
+ // Check the rows content
+ List<?> rowElements = manager.getRowElementsList();
+ checkModifiedRowsContent(rowElements);
+
+ // Manage the undo
+ editingDomain.getCommandStack().undo();
+
+ // Check the rows content
+ rowElements = manager.getRowElementsList();
+ checkInitialRowsContent(rowElements);
+
+ // Manage the undo
+ editingDomain.getCommandStack().redo();
+ manager.doCollapseExpandAction(CollapseAndExpandActionsEnum.EXPAND_ALL, null);
+ fixture.flushDisplayEvents();
+
+ // Check the rows content
+ rowElements = manager.getRowElementsList();
+ checkModifiedRowsContent(rowElements);
+
+ }
+
+ /**
+ * This allows to check the initial rows contents (it will be identical after the undo).
+ *
+ * @param rowElements The rows elements from the table.
+ */
+ protected void checkInitialRowsContent(final List<?> rowElements) {
+ Assert.assertEquals(2, rowElements.size());
+
+ final Object firstRowRepresentedElement = ((EObjectTreeItemAxis) rowElements.get(0)).getElement();
+ Assert.assertTrue("The first row must be a tree filling configuration", firstRowRepresentedElement instanceof TreeFillingConfiguration); //$NON-NLS-1$
+
+ final Object secondRowRepresentedElement = ((EObjectTreeItemAxis) rowElements.get(1)).getElement();
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) secondRowRepresentedElement).eClass());
+ Assert.assertEquals(REQUIREMENT_1, ((org.eclipse.uml2.uml.Class) secondRowRepresentedElement).getName());
+ }
+
+ /**
+ * This allows to check the initial rows contents (it will be identical after the undo).
+ *
+ * @param rowElements The rows elements from the table.
+ */
+ protected void checkModifiedRowsContent(final List<?> rowElements) {
+ Assert.assertEquals(4, rowElements.size());
+
+ final Object firstRowRepresentedElement = ((EObjectTreeItemAxis) rowElements.get(0)).getElement();
+ Assert.assertTrue("The first row must be a tree filling configuration", firstRowRepresentedElement instanceof TreeFillingConfiguration); //$NON-NLS-1$
+
+ final Object secondRowRepresentedElement = ((EObjectTreeItemAxis) rowElements.get(1)).getElement();
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) secondRowRepresentedElement).eClass());
+ Assert.assertEquals(REQUIREMENT_1, ((org.eclipse.uml2.uml.Class) secondRowRepresentedElement).getName());
+
+ final Object thirdRowRepresentedElement = ((EObjectTreeItemAxis) rowElements.get(2)).getElement();
+ Assert.assertTrue("The third row must be a tree filling configuration", thirdRowRepresentedElement instanceof TreeFillingConfiguration); //$NON-NLS-1$
+
+ final Object fourthRowRepresentedElement = ((EObjectTreeItemAxis) rowElements.get(3)).getElement();
+ Assert.assertEquals(UMLPackage.eINSTANCE.getClass_(), ((EObject) fourthRowRepresentedElement).eClass());
+ Assert.assertEquals(NESTED_REQUIREMENT_1, ((org.eclipse.uml2.uml.Class) fourthRowRepresentedElement).getName());
+ }
+
+}
diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/tests/AllTests.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/tests/AllTests.java
index 9a3978e1fac..1e5dd077c11 100644
--- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/tests/AllTests.java
+++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/tests/AllTests.java
@@ -22,6 +22,7 @@ import org.eclipse.papyrus.uml.nattable.clazz.config.tests.bugs.EditInvalidPaste
import org.eclipse.papyrus.uml.nattable.clazz.config.tests.bugs.MoveElementsTreeTableTest;
import org.eclipse.papyrus.uml.nattable.clazz.config.tests.bugs.NoDepth0TreeFillingConfigurationTest;
import org.eclipse.papyrus.uml.nattable.clazz.config.tests.bugs.OpenAndDeleteTest;
+import org.eclipse.papyrus.uml.nattable.clazz.config.tests.bugs.RequirementsNestedClassifier;
import org.eclipse.papyrus.uml.nattable.clazz.config.tests.creation.outside.CreateElementDepth0_H1_V3_V1_Test;
import org.eclipse.papyrus.uml.nattable.clazz.config.tests.creation.outside.CreateElementDepth0_V1_V3_V1_Test;
import org.eclipse.papyrus.uml.nattable.clazz.config.tests.creation.outside.CreateElementDepth1_H1_H3_V1_Test;
@@ -189,6 +190,9 @@ import org.junit.runners.Suite.SuiteClasses;
// Bug 481020 : Delete a requirement containing a nested requirement
DeleteRequirementsWithNestedClassifier.class,
+ // Bug 481023 : The nested requirement was not available in table
+ RequirementsNestedClassifier.class,
+
// Move elements
MoveElementsTreeTableTest.class,

Back to the top