Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrschnekenbu2012-05-24 16:57:38 +0000
committerrschnekenbu2012-05-24 16:57:38 +0000
commitbfb884c9ed3473f0d46d631c0cbb396c65e743e0 (patch)
tree62c5bb21be68e9778feb9a503c155d72516021ac
parent2f0cd462efa173919740c9b220ae1d40538a8ac3 (diff)
downloadorg.eclipse.papyrus-bfb884c9ed3473f0d46d631c0cbb396c65e743e0.tar.gz
org.eclipse.papyrus-bfb884c9ed3473f0d46d631c0cbb396c65e743e0.tar.xz
org.eclipse.papyrus-bfb884c9ed3473f0d46d631c0cbb396c65e743e0.zip
374636: [SYSML][Model Explorer] Copy / paste of a part does not create the corresponding association
https://bugs.eclipse.org/bugs/show_bug.cgi?id=374636 fix 2 missing classes
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.uml2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.uml b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.uml
index 9096891dc4a..78197644c79 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.uml
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/model/SysMLModelExplorerCopyPasteTestModel.uml
@@ -36,7 +36,7 @@
<targets xmi:type="uml:Class" href="ModelWithBDD.uml#_K5RWYHRGEeGbA9TcuN7qCA"/>
</ModelExplorerTest:SourceTargetRulesCopyPasteTest>
<ModelExplorerTest:ElementTypeRulesCopyPasteTest xmi:id="_wKFoUH2YEeGYcfVa7z8CyQ" base_Package="_v-7hMH2YEeGYcfVa7z8CyQ" elementType="org.eclipse.papyrus.sysml.Block" preCopyInitialization="List&lt;Property> originalParts = new ArrayList&lt;Property>(); for(Property p : ((org.eclipse.uml2.uml.Class)copiedEObject).getAllAttributes()) { &#x9;if(new org.eclipse.papyrus.sysml.service.types.matcher.PartPropertyMatcher().matches(p)) {originalParts.add(p);}} additionalChecks.put(&quot;originalParts&quot;, originalParts);" postCopyRule=" FilteredCollectionView&lt;EObject> newClasses = new FilteredCollectionView&lt;EObject>(delta, new IFilter() { /** * {@inheritDoc} */ public boolean isAllowed(Object object) { return object instanceof org.eclipse.uml2.uml.Class &amp;&amp; !(object instanceof org.eclipse.uml2.uml.Association); } }); Assert.assertEquals(&quot;New values should contain a Class&quot;, 1, newClasses.size()); org.eclipse.uml2.uml.Class newBlock = newClasses.toArray(new org.eclipse.uml2.uml.Class[]{})[0]; Assert.assertNotNull(&quot;Block stereotype should be applied&quot;, ((org.eclipse.uml2.uml.Class) newBlock) .getAppliedStereotype(&quot;SysML::Blocks::Block&quot;)); List&lt;Property> originalParts = (List&lt;Property>) originalModel .get(&quot;originalParts&quot;); List&lt;Property> newParts = new ArrayList&lt;Property>(); for (Property p : ((org.eclipse.uml2.uml.Class) newBlock) .getAllAttributes()) { if (new org.eclipse.papyrus.sysml.service.types.matcher.PartPropertyMatcher().matches(p)) { newParts.add(p); Assert.assertNotNull( &quot;Part should have an associated association.&quot;, p.getAssociation()); } } Assert.assertEquals( &quot;Both original and new list of attributes should be quivalent for the blocks&quot;, originalParts.size(), newParts.size());"/>
- <ModelExplorerTest:SourceTargetRulesCopyPasteTest xmi:id="_Rel5f32aEeGYcfVa7z8CyQ" base_Class="_ReSXcH2aEeGYcfVa7z8CyQ" feature="ownedElement" additionalElementsQuantity="3">
+ <ModelExplorerTest:SourceTargetRulesCopyPasteTest xmi:id="_Rel5f32aEeGYcfVa7z8CyQ" base_Class="_ReSXcH2aEeGYcfVa7z8CyQ" feature="ownedElement" additionalElementsQuantity="4">
<sourceElement xmi:type="uml:Class" href="ModelWithBDD.uml#__OVZQHRFEeGbA9TcuN7qCA"/>
<targets xmi:type="uml:Package" href="ModelWithBDD.uml#_E8hEEHRGEeGbA9TcuN7qCA"/>
<targets xmi:type="uml:Model" href="ModelWithBDD.uml#_UV0P8EAREeCMpNWxgNcrog"/>

Back to the top