Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.di2
-rw-r--r--tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.notation81
-rw-r--r--tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.txt2
-rw-r--r--tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.uml2
-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/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.java91
-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/paste/tests/AbstractPasteWithCategoriesTests.java7
-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.java16
7 files changed, 194 insertions, 7 deletions
diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.di b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.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/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.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/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.notation
new file mode 100644
index 00000000000..c6fdcd9c279
--- /dev/null
+++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.notation
@@ -0,0 +1,81 @@
+<?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="_Yk1o8GZzEeSDCaDFwPGYVw" name="ClassTreeTable0" currentRowAxisProvider="_Yk1o82ZzEeSDCaDFwPGYVw" currentColumnAxisProvider="_Yk1o8WZzEeSDCaDFwPGYVw">
+ <styles xmi:type="nattablestyle:IntListValueStyle" xmi:id="_PCk74HcDEeSihK466TsMPg" name="hiddenCategoriesByDepth">
+ <intListValue>0</intListValue>
+ <intListValue>1</intListValue>
+ <intListValue>2</intListValue>
+ </styles>
+ <context xmi:type="uml:Model" href="PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.uml#_W0BLkGZzEeSDCaDFwPGYVw"/>
+ <owner xmi:type="uml:Model" href="PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.uml#_W0BLkGZzEeSDCaDFwPGYVw"/>
+ <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="_Yk1o8WZzEeSDCaDFwPGYVw" 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="_Yk1o8mZzEeSDCaDFwPGYVw">
+ <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>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_c9OSsHrxEeSFP8xW-pegcg">
+ <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/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_c9O5wHrxEeSFP8xW-pegcg">
+ <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#//RedefinableElement/isLeaf"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_c9O5wXrxEeSFP8xW-pegcg">
+ <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#//Parameter/direction"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_Yk1o82ZzEeSDCaDFwPGYVw" description="This axis provider manages the rows, according to the wanted hierarchy" name="HierarchicalRowaAxisManager" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_53PFMG5fEeSSk_Uaj9vcpQ" indexStyle="NUMERIC" displayIndex="false">
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_BU9nQXcBEeSihK466TsMPg" pasteConfiguration="_3ExscHyIEeSxVJAGQ_SozA" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_BU9nQncBEeSihK466TsMPg">
+ <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="_BU9nQ3cBEeSihK466TsMPg" pasteConfiguration="_3ExscXyIEeSxVJAGQ_SozA" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_BU9nRHcBEeSihK466TsMPg">
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </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="_BU9nRXcBEeSihK466TsMPg" pasteConfiguration="_3ExscnyIEeSxVJAGQ_SozA" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_BU9nRncBEeSihK466TsMPg">
+ <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:TreeFillingConfiguration" xmi:id="_BU9nR3cBEeSihK466TsMPg" pasteConfiguration="_3Exsc3yIEeSxVJAGQ_SozA" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_BU9nSHcBEeSihK466TsMPg">
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/>
+ </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="_er6pEHu1EeSOIP1uah0_EA" pasteConfiguration="_3ExsdHyIEeSxVJAGQ_SozA" depth="2" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_er6pEXu1EeSOIP1uah0_EA">
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioralFeature/ownedParameter"/>
+ </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="_3ExscHyIEeSxVJAGQ_SozA" detachedMode="false" pastedElementId="org.eclipse.papyrus.uml.Class">
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Package/packagedElement"/>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_3ExscXyIEeSxVJAGQ_SozA" detachedMode="false" pastedElementId="org.eclipse.papyrus.uml.Property">
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_3ExscnyIEeSxVJAGQ_SozA" detachedMode="false" pastedElementId="org.eclipse.papyrus.uml.Operation">
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_3Exsc3yIEeSxVJAGQ_SozA" detachedMode="false" pastedElementId="org.eclipse.papyrus.uml.Class">
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:PasteEObjectConfiguration" xmi:id="_3ExsdHyIEeSxVJAGQ_SozA" detachedMode="false" pastedElementId="org.eclipse.papyrus.uml.Parameter">
+ <pasteElementContainementFeature xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioralFeature/ownedParameter"/>
+ </ownedAxisConfigurations>
+ <axisManagerConfigurations xmi:type="nattableaxisconfiguration:AxisManagerConfiguration" xmi:id="_BU9nQHcBEeSihK466TsMPg" localSpecificConfigurations="_BU9nQXcBEeSihK466TsMPg _BU9nQ3cBEeSihK466TsMPg _BU9nRXcBEeSihK466TsMPg _BU9nR3cBEeSihK466TsMPg _er6pEHu1EeSOIP1uah0_EA">
+ <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/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.txt b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.txt
new file mode 100644
index 00000000000..4782e884b6f
--- /dev/null
+++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.txt
@@ -0,0 +1,2 @@
+Class0 Class0 public false N/A
+Class1 Class1 private true N/A \ No newline at end of file
diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.uml b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.uml
new file mode 100644
index 00000000000..03789110028
--- /dev/null
+++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/resources/bugs/bug481310/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.uml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_W0BLkGZzEeSDCaDFwPGYVw" name="model"/>
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/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.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/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.java
new file mode 100644
index 00000000000..5b12deac6c0
--- /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/PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * 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.uml.nattable.clazz.config.tests.bugs;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ITreeItemAxis;
+import org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.tests.AbstractPasteWithCategoriesMultiColumnsAttachedModeTests;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+
+/**
+ * Test pastes with 1 hidden category to the 1st level (H1), 3 hidden categories on the 2nd level (H3) and 1 hidden category to the 3rd level (H1).
+ * If only the first depth elements are added, the paste must be done correctly.
+ */
+public class PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test extends AbstractPasteWithCategoriesMultiColumnsAttachedModeTests {
+
+ /**
+ * The bug 481310 folder.
+ */
+ public static final String BUG_481310_FOLDER = "/resources/bugs/bug481310/"; //$NON-NLS-1$
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.tests.AbstractPasteWithCategoriesTests#getSourcePath()
+ */
+ @Override
+ protected String getSourcePath() {
+ return BUG_481310_FOLDER;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.tests.AbstractPasteWithCategoriesTests#validateReturnedStatus(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ protected void validateReturnedStatus(final IStatus status) {
+ Assert.assertTrue(status.isOK());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.tests.AbstractPasteWithCategoriesTests#verifyModel_1_3_1()
+ */
+ @Override
+ protected void verifyModel_1_3_1() throws ServiceException {
+ final EObject context = getTable().getContext();
+ Assert.assertTrue(context instanceof Model);
+ final Model pack = (Model) context;
+ final List<NamedElement> members = pack.getMembers();
+ Assert.assertEquals(2, members.size());
+ for (int i = 0; i < members.size(); i++) {
+ final NamedElement tmp = members.get(i);
+ Assert.assertTrue(tmp instanceof Class);
+ final Class clazz = (Class) tmp;
+ final StringBuilder className = new StringBuilder(CLASS_BASE_NAME);
+ className.append(i);
+ Assert.assertEquals(className.toString(), clazz.getName());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.tests.AbstractPasteWithCategoriesTests#checkChildrenClasses(org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ITreeItemAxis)
+ */
+ @Override
+ protected void checkRootClasses(final ITreeItemAxis root, final EObject parent) throws Exception {
+ // Do nothing : no child in classes
+ }
+
+}
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/paste/tests/AbstractPasteWithCategoriesTests.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/paste/tests/AbstractPasteWithCategoriesTests.java
index 8c40e5a636b..4714924b664 100644
--- a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/paste/tests/AbstractPasteWithCategoriesTests.java
+++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/paste/tests/AbstractPasteWithCategoriesTests.java
@@ -420,7 +420,12 @@ public abstract class AbstractPasteWithCategoriesTests extends AbstractOpenTable
}
}
- protected final void validateReturnedStatus(final IStatus status) {
+ /**
+ * This allows to check the returned status of the paste action.
+ *
+ * @param status The status got.
+ */
+ protected void validateReturnedStatus(final IStatus status) {
String className = getClass().getSimpleName();
className = className.replaceFirst("PasteWithCategories_", ""); //$NON-NLS-1$ //$NON-NLS-2$
final String[] result = className.split("_"); //$NON-NLS-1$
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 1e5dd077c11..5025b0a13e9 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.PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test;
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;
@@ -186,7 +187,7 @@ import org.junit.runners.Suite.SuiteClasses;
SortAxisClassTreeTableTest.class,
EditAxisClassTreeTableTest.class,
-
+
// Bug 481020 : Delete a requirement containing a nested requirement
DeleteRequirementsWithNestedClassifier.class,
@@ -281,6 +282,9 @@ import org.junit.runners.Suite.SuiteClasses;
PasteWithCategories_V1_H1_V1_MultiColumns_AttachedMode_Test.class,
PasteWithCategories_V1_V3_H1_MultiColumns_AttachedMode_Test.class,
PasteWithCategories_V1_V3_V1_MultiColumns_AttachedMode_Test.class,
+
+ // Bug 481310 : Paste one depth when others can't get pasted elements
+ PasteWithCategories_H1_H3_H1_MultiColumns_AttachedMode_Bug481310Test.class,
// Detached Mode
// Paste tests for single column
@@ -300,7 +304,7 @@ import org.junit.runners.Suite.SuiteClasses;
PasteWithCategories_V1_H1_V1_SingleColumn_DetachedMode_Test.class,
PasteWithCategories_V1_V3_H1_SingleColumn_DetachedMode_Test.class,
PasteWithCategories_V1_V3_V1_SingleColumn_DetachedMode_Test.class,
-
+
// Paste tests for multi columns
PasteWithCategories_Empty_H1_H1_MultiColumns_DetachedMode_Test.class,
PasteWithCategories_Empty_H1_V1_MultiColumns_DetachedMode_Test.class,
@@ -321,7 +325,7 @@ import org.junit.runners.Suite.SuiteClasses;
// Tests of the paste with overwrite
PasteEmptyClipboard_H1_H1_H1_MultiColumns_Test.class,
-
+
PasteCellsOverwriteAll_H1_H1_H1_MultiColumns_Test.class,
PasteCellsOverwriteAll_V1_V3_V1_MultiColumns_Test.class,
PasteCellsOverwriteByOneLine_H1_H1_H1_MultiColumns_Test.class,
@@ -354,7 +358,7 @@ import org.junit.runners.Suite.SuiteClasses;
// Tests of insert
InsertEmptyClipboard_H1_H1_H1_MultiColumns_Test.class,
-
+
InsertRowsReplaceAll_H1_H1_H1_MultiColumns_Test.class,
InsertRowsReplaceAll_V1_V3_V1_MultiColumns_Test.class,
InsertRowsAddAll_H1_H1_H1_MultiColumns_Test.class,
@@ -393,8 +397,8 @@ import org.junit.runners.Suite.SuiteClasses;
ImportEmptyAddAll_V1_V3_V1_MultiColumns_Test.class,
ImportEmptySkipAll_H1_H1_H1_MultiColumns_Test.class,
ImportEmptySkipAll_V1_V3_V1_MultiColumns_Test.class,
-
- //validation markers tests
+
+ // validation markers tests
ValidationMarkerInTableHeaderTest.class,
})
public class AllTests {

Back to the top