diff options
author | rschnekenbu | 2012-05-24 16:57:38 +0000 |
---|---|---|
committer | rschnekenbu | 2012-05-24 16:57:38 +0000 |
commit | bfb884c9ed3473f0d46d631c0cbb396c65e743e0 (patch) | |
tree | 62c5bb21be68e9778feb9a503c155d72516021ac | |
parent | 2f0cd462efa173919740c9b220ae1d40538a8ac3 (diff) | |
download | org.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.uml | 2 |
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<Property> originalParts = new ArrayList<Property>(); for(Property p : ((org.eclipse.uml2.uml.Class)copiedEObject).getAllAttributes()) { 	if(new org.eclipse.papyrus.sysml.service.types.matcher.PartPropertyMatcher().matches(p)) {originalParts.add(p);}} additionalChecks.put("originalParts", originalParts);" postCopyRule=" FilteredCollectionView<EObject> newClasses = new FilteredCollectionView<EObject>(delta, new IFilter() { /** * {@inheritDoc} */ public boolean isAllowed(Object object) { return object instanceof org.eclipse.uml2.uml.Class && !(object instanceof org.eclipse.uml2.uml.Association); } }); Assert.assertEquals("New values should contain a Class", 1, newClasses.size()); org.eclipse.uml2.uml.Class newBlock = newClasses.toArray(new org.eclipse.uml2.uml.Class[]{})[0]; Assert.assertNotNull("Block stereotype should be applied", ((org.eclipse.uml2.uml.Class) newBlock) .getAppliedStereotype("SysML::Blocks::Block")); List<Property> originalParts = (List<Property>) originalModel .get("originalParts"); List<Property> newParts = new ArrayList<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( "Part should have an associated association.", p.getAssociation()); } } Assert.assertEquals( "Both original and new list of attributes should be quivalent for the blocks", 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"/>
|