Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2013-06-17 12:17:22 +0000
committervlorenzo2013-06-17 12:17:22 +0000
commit7393d76c8be3937bdca4a97394051bb34727a51c (patch)
tree7b778366e83ece76dbe81072a6ed8b9a8e4b6b1d /tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests
parentc92948ef0358256bdae1cfdb8f955aac4ecbc69e (diff)
downloadorg.eclipse.papyrus-7393d76c8be3937bdca4a97394051bb34727a51c.tar.gz
org.eclipse.papyrus-7393d76c8be3937bdca4a97394051bb34727a51c.tar.xz
org.eclipse.papyrus-7393d76c8be3937bdca4a97394051bb34727a51c.zip
410912: [UML] Papyrus must provides Tests for the class UMLStereotypePropertyContentProvider
https://bugs.eclipse.org/bugs/show_bug.cgi?id=410912
Diffstat (limited to 'tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests')
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/profileTest.profile.di17
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/profileTest.profile.notation163
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/profileTest.profile.uml152
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java2
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/UMLStereotypePropertyContentProviderTest.java247
5 files changed, 580 insertions, 1 deletions
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/profileTest.profile.di b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/profileTest.profile.di
new file mode 100644
index 00000000000..9a94f6f2b3b
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/profileTest.profile.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="profileTest.profile.notation#_dDohENcjEeKw9PDRLmC3Lg"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="profileTest.profile.notation#_dDohENcjEeKw9PDRLmC3Lg"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/profileTest.profile.notation b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/profileTest.profile.notation
new file mode 100644
index 00000000000..045d1f466ba
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/profileTest.profile.notation
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_dDohENcjEeKw9PDRLmC3Lg" type="PapyrusUMLProfileDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_ekLt0NcjEeKw9PDRLmC3Lg" type="1030" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ekeowNcjEeKw9PDRLmC3Lg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ekeowdcjEeKw9PDRLmC3Lg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ekeowtcjEeKw9PDRLmC3Lg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ekeow9cjEeKw9PDRLmC3Lg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ekeoxNcjEeKw9PDRLmC3Lg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ekeoxdcjEeKw9PDRLmC3Lg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ekoZwNcjEeKw9PDRLmC3Lg" type="1047"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ekoZwdcjEeKw9PDRLmC3Lg" type="1042">
+ <children xmi:type="notation:Shape" xmi:id="_f6eLUNcjEeKw9PDRLmC3Lg" type="1023" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_f6eLUtcjEeKw9PDRLmC3Lg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_f6eLU9cjEeKw9PDRLmC3Lg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_f6eLVNcjEeKw9PDRLmC3Lg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_f6eLVdcjEeKw9PDRLmC3Lg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_f6eLVtcjEeKw9PDRLmC3Lg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_f6eLV9cjEeKw9PDRLmC3Lg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_f6eLWNcjEeKw9PDRLmC3Lg" type="1046"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_f6n8UNcjEeKw9PDRLmC3Lg" type="1052">
+ <children xmi:type="notation:Shape" xmi:id="_pLx-oNcjEeKw9PDRLmC3Lg" type="3002" fontName="Segoe UI" lineColor="0">
+ <element xmi:type="uml:Property" href="profileTest.profile.uml#_pK5N0NcjEeKw9PDRLmC3Lg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_pLx-odcjEeKw9PDRLmC3Lg"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_f6n8UdcjEeKw9PDRLmC3Lg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_f6n8UtcjEeKw9PDRLmC3Lg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_f6n8U9cjEeKw9PDRLmC3Lg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_f6n8VNcjEeKw9PDRLmC3Lg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_f6n8VdcjEeKw9PDRLmC3Lg" visible="false" type="1053">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_f6n8VtcjEeKw9PDRLmC3Lg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_f6n8V9cjEeKw9PDRLmC3Lg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_f6n8WNcjEeKw9PDRLmC3Lg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_f6n8WdcjEeKw9PDRLmC3Lg"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="profileTest.profile.uml#_f6LQYNcjEeKw9PDRLmC3Lg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_f6eLUdcjEeKw9PDRLmC3Lg" x="60" y="43"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ekoZwtcjEeKw9PDRLmC3Lg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ekoZw9cjEeKw9PDRLmC3Lg"/>
+ </children>
+ <element xmi:type="uml:Profile" href="profileTest.profile.uml#_ejJMANcjEeKw9PDRLmC3Lg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ekLt0dcjEeKw9PDRLmC3Lg" x="70" y="215" width="311" height="216"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_fSdJENcjEeKw9PDRLmC3Lg" type="1030" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fSdJEtcjEeKw9PDRLmC3Lg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fSdJE9cjEeKw9PDRLmC3Lg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fSdJFNcjEeKw9PDRLmC3Lg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fSdJFdcjEeKw9PDRLmC3Lg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fSdJFtcjEeKw9PDRLmC3Lg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fSdJF9cjEeKw9PDRLmC3Lg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_fSdJGNcjEeKw9PDRLmC3Lg" type="1047"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_fSdJGdcjEeKw9PDRLmC3Lg" type="1042">
+ <children xmi:type="notation:Shape" xmi:id="_g2bdQNcjEeKw9PDRLmC3Lg" type="1023" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_g2bdQtcjEeKw9PDRLmC3Lg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_g2bdQ9cjEeKw9PDRLmC3Lg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_g2bdRNcjEeKw9PDRLmC3Lg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_g2bdRdcjEeKw9PDRLmC3Lg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_g2bdRtcjEeKw9PDRLmC3Lg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_g2bdR9cjEeKw9PDRLmC3Lg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_g2bdSNcjEeKw9PDRLmC3Lg" type="1046"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_g2bdSdcjEeKw9PDRLmC3Lg" type="1052">
+ <children xmi:type="notation:Shape" xmi:id="_s4oq4NcjEeKw9PDRLmC3Lg" type="3002" fontName="Segoe UI" lineColor="0">
+ <element xmi:type="uml:Property" href="profileTest.profile.uml#_s4VI4NcjEeKw9PDRLmC3Lg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_s4oq4dcjEeKw9PDRLmC3Lg"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_g2bdStcjEeKw9PDRLmC3Lg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_g2bdS9cjEeKw9PDRLmC3Lg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_g2bdTNcjEeKw9PDRLmC3Lg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g2bdTdcjEeKw9PDRLmC3Lg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_g2bdTtcjEeKw9PDRLmC3Lg" visible="false" type="1053">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_g2bdT9cjEeKw9PDRLmC3Lg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_g2bdUNcjEeKw9PDRLmC3Lg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_g2bdUdcjEeKw9PDRLmC3Lg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g2bdUtcjEeKw9PDRLmC3Lg"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="profileTest.profile.uml#_g2RsQNcjEeKw9PDRLmC3Lg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g2bdQdcjEeKw9PDRLmC3Lg" x="74" y="54"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_fSdJGtcjEeKw9PDRLmC3Lg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fSdJG9cjEeKw9PDRLmC3Lg"/>
+ </children>
+ <element xmi:type="uml:Profile" href="profileTest.profile.uml#_fSJnENcjEeKw9PDRLmC3Lg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fSdJEdcjEeKw9PDRLmC3Lg" x="595" y="220" width="381" height="206"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_m0ohEdcjEeKw9PDRLmC3Lg" type="1031" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_m0ohE9cjEeKw9PDRLmC3Lg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohFNcjEeKw9PDRLmC3Lg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_m0ohFdcjEeKw9PDRLmC3Lg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohFtcjEeKw9PDRLmC3Lg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_m0ohF9cjEeKw9PDRLmC3Lg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohGNcjEeKw9PDRLmC3Lg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_m0ohG9cjEeKw9PDRLmC3Lg" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohHNcjEeKw9PDRLmC3Lg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohHdcjEeKw9PDRLmC3Lg" key="StereotypeList" value="StandardProfileL2::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohHtcjEeKw9PDRLmC3Lg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohH9cjEeKw9PDRLmC3Lg" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohINcjEeKw9PDRLmC3Lg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_m0ohGdcjEeKw9PDRLmC3Lg" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_m0ohGtcjEeKw9PDRLmC3Lg" x="310" y="35"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_m0ohIdcjEeKw9PDRLmC3Lg" type="1031" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_m0ohI9cjEeKw9PDRLmC3Lg" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohJNcjEeKw9PDRLmC3Lg" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_m0ohJdcjEeKw9PDRLmC3Lg" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohJtcjEeKw9PDRLmC3Lg" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_m0ohJ9cjEeKw9PDRLmC3Lg" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohKNcjEeKw9PDRLmC3Lg" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_m0ohK9cjEeKw9PDRLmC3Lg" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohLNcjEeKw9PDRLmC3Lg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohLdcjEeKw9PDRLmC3Lg" key="StereotypeList" value="StandardProfileL2::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohLtcjEeKw9PDRLmC3Lg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohL9cjEeKw9PDRLmC3Lg" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m0ohMNcjEeKw9PDRLmC3Lg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_m0ohKdcjEeKw9PDRLmC3Lg" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Activity"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_m0ohKtcjEeKw9PDRLmC3Lg" x="165" y="130"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_dDohEdcjEeKw9PDRLmC3Lg"/>
+ <element xmi:type="uml:Profile" href="profileTest.profile.uml#_dCSdQNcjEeKw9PDRLmC3Lg"/>
+ <edges xmi:type="notation:Connector" xmi:id="_iUTwgNcjEeKw9PDRLmC3Lg" type="4002" source="_g2bdQNcjEeKw9PDRLmC3Lg" target="_f6eLUNcjEeKw9PDRLmC3Lg" lineColor="0">
+ <children xmi:type="notation:DecorationNode" xmi:id="_iUTwg9cjEeKw9PDRLmC3Lg" type="6007">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_iUTwhNcjEeKw9PDRLmC3Lg" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_iUTwgdcjEeKw9PDRLmC3Lg" fontName="Segoe UI"/>
+ <element xmi:type="uml:Generalization" href="profileTest.profile.uml#_iS9ssNcjEeKw9PDRLmC3Lg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_iUTwgtcjEeKw9PDRLmC3Lg" points="[-50, -1, 474, -10]$[-474, -13, 50, -22]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_oLzvYNcjEeKw9PDRLmC3Lg" type="1013" source="_f6eLUNcjEeKw9PDRLmC3Lg" target="_m0ohIdcjEeKw9PDRLmC3Lg" lineColor="0">
+ <styles xmi:type="notation:FontStyle" xmi:id="_oLzvYdcjEeKw9PDRLmC3Lg" fontName="Segoe UI"/>
+ <element xmi:type="uml:Extension" href="profileTest.profile.uml#_oLg0cNcjEeKw9PDRLmC3Lg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_oLzvYtcjEeKw9PDRLmC3Lg" points="[4, -50, 0, 139]$[-20, -183, -24, 6]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oLzvY9cjEeKw9PDRLmC3Lg" id="(0.24,0.64)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_okptMNcjEeKw9PDRLmC3Lg" type="1013" source="_g2bdQNcjEeKw9PDRLmC3Lg" target="_m0ohEdcjEeKw9PDRLmC3Lg" lineColor="0">
+ <styles xmi:type="notation:FontStyle" xmi:id="_okptMdcjEeKw9PDRLmC3Lg" fontName="Segoe UI"/>
+ <element xmi:type="uml:Extension" href="profileTest.profile.uml#_okgjQNcjEeKw9PDRLmC3Lg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_okptMtcjEeKw9PDRLmC3Lg" points="[-23, -21, 314, 265]$[-287, -284, 50, 2]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_okzeMNcjEeKw9PDRLmC3Lg" id="(0.23,0.29)"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/profileTest.profile.uml b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/profileTest.profile.uml
new file mode 100644
index 00000000000..de79a1d29f2
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/profileTest.profile.uml
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_dCSdQNcjEeKw9PDRLmC3Lg" name="Profile" metaclassReference="_m0U_ENcjEeKw9PDRLmC3Lg _m0ohENcjEeKw9PDRLmC3Lg" metamodelReference="_dCSdQdcjEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xjOKsdcjEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_zdqeIdcjEeKw9PDRLmC3Lg" name="Profile" nsURI="http:///schemas/Profile/_zdqeINcjEeKw9PDRLmC3Lg/1" nsPrefix="Profile">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_zdqeItcjEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_ejJMANcjEeKw9PDRLmC3Lg"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_zeQUANcjEeKw9PDRLmC3Lg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zeQUAdcjEeKw9PDRLmC3Lg" key="Version" value="0.0.2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zeQUAtcjEeKw9PDRLmC3Lg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zeQUA9cjEeKw9PDRLmC3Lg" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zeQUBNcjEeKw9PDRLmC3Lg" key="Date" value="2013-06-17"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zeQUBdcjEeKw9PDRLmC3Lg" key="Author" value=""/>
+ </eAnnotations>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_xj9xkNcjEeKw9PDRLmC3Lg" name="Profile" nsURI="http:///schemas/Profile/_xjOKsNcjEeKw9PDRLmC3Lg/0" nsPrefix="Profile">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xj9xkdcjEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_ejJMANcjEeKw9PDRLmC3Lg"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xkjncNcjEeKw9PDRLmC3Lg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xkjncdcjEeKw9PDRLmC3Lg" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xkjnctcjEeKw9PDRLmC3Lg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xkjnc9cjEeKw9PDRLmC3Lg" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xkjndNcjEeKw9PDRLmC3Lg" key="Date" value="2013-06-17"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xkjnddcjEeKw9PDRLmC3Lg" key="Author" value=""/>
+ </eAnnotations>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_m0U_ENcjEeKw9PDRLmC3Lg" alias="Class">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </elementImport>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_m0ohENcjEeKw9PDRLmC3Lg" alias="Activity">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Activity"/>
+ </elementImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_dCSdQdcjEeKw9PDRLmC3Lg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_dCSdQtcjEeKw9PDRLmC3Lg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Profile" xmi:id="_ejJMANcjEeKw9PDRLmC3Lg" name="Profile1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xkHikNcjEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_zdqeJNcjEeKw9PDRLmC3Lg" name="Profile1" nsURI="http://Profile/schemas/Profile1/_zdqeI9cjEeKw9PDRLmC3Lg/1" nsPrefix="Profile1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_zeaFANcjEeKw9PDRLmC3Lg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zeaFAdcjEeKw9PDRLmC3Lg" key="Version" value="0.0.2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zeaFAtcjEeKw9PDRLmC3Lg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zeaFA9cjEeKw9PDRLmC3Lg" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zeaFBNcjEeKw9PDRLmC3Lg" key="Date" value="2013-06-17"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zeaFBdcjEeKw9PDRLmC3Lg" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_zdqeJdcjEeKw9PDRLmC3Lg" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_zdqeJtcjEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_f6LQYNcjEeKw9PDRLmC3Lg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_zdqeJ9cjEeKw9PDRLmC3Lg" name="base_Activity" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Activity"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_zdqeKdcjEeKw9PDRLmC3Lg" name="prop1" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_xkQsgNcjEeKw9PDRLmC3Lg" name="Profile1" nsURI="http://Profile/schemas/Profile1/_xj9xktcjEeKw9PDRLmC3Lg/0" nsPrefix="Profile1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xktYcNcjEeKw9PDRLmC3Lg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xktYcdcjEeKw9PDRLmC3Lg" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xktYctcjEeKw9PDRLmC3Lg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xktYc9cjEeKw9PDRLmC3Lg" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xktYdNcjEeKw9PDRLmC3Lg" key="Date" value="2013-06-17"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xktYddcjEeKw9PDRLmC3Lg" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_xkQsgdcjEeKw9PDRLmC3Lg" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xkQsgtcjEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_f6LQYNcjEeKw9PDRLmC3Lg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_xkQsg9cjEeKw9PDRLmC3Lg" name="base_Activity" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Activity"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_xkQshdcjEeKw9PDRLmC3Lg" name="prop1" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ </eAnnotations>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_f6LQYNcjEeKw9PDRLmC3Lg" name="Stereotype1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_oLXDcNcjEeKw9PDRLmC3Lg" name="base_Activity" association="_oLg0cNcjEeKw9PDRLmC3Lg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Activity"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_pK5N0NcjEeKw9PDRLmC3Lg" name="prop1" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_sFmrcNcjEeKw9PDRLmC3Lg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_sFv1YNcjEeKw9PDRLmC3Lg" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_sGDXYNcjEeKw9PDRLmC3Lg">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_oLg0cNcjEeKw9PDRLmC3Lg" name="E_Stereotype1_Activity1" memberEnd="_oLg0cdcjEeKw9PDRLmC3Lg _oLXDcNcjEeKw9PDRLmC3Lg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_oLg0cdcjEeKw9PDRLmC3Lg" name="extension_Stereotype1" type="_f6LQYNcjEeKw9PDRLmC3Lg" aggregation="composite" association="_oLg0cNcjEeKw9PDRLmC3Lg"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Profile" xmi:id="_fSJnENcjEeKw9PDRLmC3Lg" name="Profile2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xkQsiNcjEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_zdzoEdcjEeKw9PDRLmC3Lg" name="Profile2" nsURI="http://Profile/schemas/Profile2/_zdzoENcjEeKw9PDRLmC3Lg/1" nsPrefix="Profile2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_zdzoEtcjEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_ejJMANcjEeKw9PDRLmC3Lg"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ze2w8NcjEeKw9PDRLmC3Lg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ze2w8dcjEeKw9PDRLmC3Lg" key="Version" value="0.0.2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ze2w8tcjEeKw9PDRLmC3Lg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ze2w89cjEeKw9PDRLmC3Lg" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ze2w9NcjEeKw9PDRLmC3Lg" key="Date" value="2013-06-17"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ze2w9dcjEeKw9PDRLmC3Lg" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_zdzoE9cjEeKw9PDRLmC3Lg" name="Stereotype2" eSuperTypes="_zdqeJdcjEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_zdzoFNcjEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_g2RsQNcjEeKw9PDRLmC3Lg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_zdzoFdcjEeKw9PDRLmC3Lg" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_zdzoF9cjEeKw9PDRLmC3Lg" name="prop2" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_xkadgNcjEeKw9PDRLmC3Lg" name="Profile2" nsURI="http://Profile/schemas/Profile2/_xkQsh9cjEeKw9PDRLmC3Lg/0" nsPrefix="Profile2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xkadgdcjEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_ejJMANcjEeKw9PDRLmC3Lg"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xlATYdcjEeKw9PDRLmC3Lg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlATYtcjEeKw9PDRLmC3Lg" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlATY9cjEeKw9PDRLmC3Lg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlATZNcjEeKw9PDRLmC3Lg" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlATZdcjEeKw9PDRLmC3Lg" key="Date" value="2013-06-17"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlATZtcjEeKw9PDRLmC3Lg" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_xkadgtcjEeKw9PDRLmC3Lg" name="Stereotype2" eSuperTypes="_xkQsgdcjEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xkadg9cjEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_g2RsQNcjEeKw9PDRLmC3Lg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_xkadhNcjEeKw9PDRLmC3Lg" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_xkadhtcjEeKw9PDRLmC3Lg" name="Attribute1" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </contents>
+ </eAnnotations>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_g2RsQNcjEeKw9PDRLmC3Lg" name="Stereotype2">
+ <generalization xmi:type="uml:Generalization" xmi:id="_iS9ssNcjEeKw9PDRLmC3Lg" general="_f6LQYNcjEeKw9PDRLmC3Lg"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_okWyQNcjEeKw9PDRLmC3Lg" name="base_Class" association="_okgjQNcjEeKw9PDRLmC3Lg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_s4VI4NcjEeKw9PDRLmC3Lg" name="prop2" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_w7NIcNcjEeKw9PDRLmC3Lg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_w7WSYNcjEeKw9PDRLmC3Lg" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_w7pNUNcjEeKw9PDRLmC3Lg">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_okgjQNcjEeKw9PDRLmC3Lg" name="E_Stereotype2_Class1" memberEnd="_okgjQdcjEeKw9PDRLmC3Lg _okWyQNcjEeKw9PDRLmC3Lg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_okgjQdcjEeKw9PDRLmC3Lg" name="extension_Stereotype2" type="_g2RsQNcjEeKw9PDRLmC3Lg" aggregation="composite" association="_okgjQNcjEeKw9PDRLmC3Lg"/>
+ </packagedElement>
+ </packagedElement>
+</uml:Profile>
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java
index acdcff8807f..fc695382b42 100644
--- a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java
@@ -17,7 +17,7 @@ import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
-@SuiteClasses({ ContentProviderTest.class
+@SuiteClasses({ ContentProviderTest.class, UMLStereotypePropertyContentProviderTest.class
})
public class AllTests {
diff --git a/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/UMLStereotypePropertyContentProviderTest.java b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/UMLStereotypePropertyContentProviderTest.java
new file mode 100644
index 00000000000..0190a72de94
--- /dev/null
+++ b/tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/UMLStereotypePropertyContentProviderTest.java
@@ -0,0 +1,247 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.tools.tests.tests;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.tools.providers.UMLStereotypePropertyContentProvider;
+import org.eclipse.papyrus.uml.tools.tests.Activator;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * This class tests the class UMLStereotypePropertyContentProvider.
+ * <ul>
+ * <li>tests the returned children according to the boolean baseProperty</li>
+ * <li>verifies that the returned children don't contains the inherited properties</li>
+ * </ul>
+ *
+ * @author vl222926
+ *
+ */
+public class UMLStereotypePropertyContentProviderTest {
+
+ /** the root profile of the tested model */
+ private Profile rootProfile;
+
+ /** the two subprofile */
+ private Profile subProfile1;
+
+ private Profile subProfile2;
+
+ /** the stereotypes owned by these subprofiles */
+ private Stereotype ste1;
+
+ private Stereotype ste2;
+
+ /** the properties owned by these stereotypes */
+ private Property prop1;
+
+ private Property prop2;
+
+ /** the base properties of these stereotypes */
+ private Property basePropSte1;
+
+ private Property basePropSte2;
+
+ /**
+ * Inits the fields of this class
+ */
+ @Before
+ public void init() {
+ try {
+ EObject testModel = EMFHelper.loadEMFModel(new ResourceSetImpl(), URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/uml/profileTest.profile.uml", true));
+ Assert.assertTrue(testModel instanceof Profile);
+ rootProfile = (Profile)testModel;
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ }
+ assertNotNull("Cannot load the EMF Tests model", rootProfile);
+
+ subProfile1 = (Profile)rootProfile.getPackagedElement("Profile1");
+ subProfile2 = (Profile)rootProfile.getPackagedElement("Profile2");
+
+ Assert.assertNotNull(subProfile1);
+ Assert.assertNotNull(subProfile2);
+
+ ste1 = (Stereotype)subProfile1.getMember("Stereotype1");
+ ste2 = (Stereotype)subProfile2.getMember("Stereotype2");
+
+ Assert.assertNotNull(ste1);
+ Assert.assertNotNull(ste2);
+
+ prop1 = (Property)ste1.getMember("prop1");
+ prop2 = (Property)ste2.getMember("prop2");
+
+ Assert.assertNotNull(prop1);
+ Assert.assertNotNull(prop2);
+
+ basePropSte1 = (Property)ste1.getMember("base_Activity");
+ basePropSte2 = (Property)ste2.getMember("base_Class");
+
+ Assert.assertNotNull(basePropSte1);
+ Assert.assertNotNull(basePropSte2);
+
+ }
+
+ /**
+ * We test the children of the rootProfile.
+ * In this test,
+ * <ul>
+ * <li>we don't want the properties base_ExtendedClass</li>
+ * <li>we don't want the inheritedProperties</li>
+ * </ul>
+ */
+ @Test
+ public void testProfileContentWithoutBaseClassPropertyWithoutInheritedProperties() {
+ UMLStereotypePropertyContentProvider provider = new UMLStereotypePropertyContentProvider(false);
+ provider.setProfiles(Collections.singletonList(rootProfile));
+ //we test the root
+ Object[] elements = provider.getElements();
+ Assert.assertEquals(1, elements.length);
+ Assert.assertEquals(elements[0], rootProfile);
+
+ //we test the first level of children
+ Assert.assertEquals(true, provider.hasChildren(rootProfile));
+ List<?> children = Arrays.asList(provider.getChildren(rootProfile));
+
+ Assert.assertEquals(2, children.size());
+ Assert.assertTrue(children.contains(subProfile1));
+ Assert.assertTrue(children.contains(subProfile2));
+
+
+ //we test the children of the first subprofile
+ Assert.assertEquals(true, provider.hasChildren(subProfile1));
+ children = Arrays.asList(provider.getChildren(subProfile1));
+ Assert.assertEquals(1, children.size());
+ Assert.assertTrue(children.contains(ste1));
+
+ //we test the children of the ste1
+ Assert.assertEquals(true, provider.hasChildren(ste1));
+ children = Arrays.asList(provider.getChildren(ste1));
+ Assert.assertEquals(1, children.size());
+ Assert.assertTrue(children.contains(prop1));
+
+ //we test the children of the prop1
+ Assert.assertEquals(false, provider.hasChildren(prop1));
+
+
+ //we test the children of the 2nd subprofile
+ Assert.assertEquals(true, provider.hasChildren(subProfile2));
+ children = Arrays.asList(provider.getChildren(subProfile2));
+ Assert.assertEquals(1, children.size());
+ Assert.assertTrue(children.contains(ste2));
+
+ //we test the children of the ste2
+ Assert.assertEquals(true, provider.hasChildren(ste2));
+ children = Arrays.asList(provider.getChildren(ste2));
+ Assert.assertEquals(1, children.size());
+ Assert.assertTrue(children.contains(prop2));
+
+ //we test the children of the prop2
+ Assert.assertEquals(false, provider.hasChildren(prop2));
+ }
+
+ /**
+ * We test the children of the rootProfile.
+ * In this test,
+ * <ul>
+ * <li>we want the properties base_ExtendedClass</li>
+ * <li>we don't want the inheritedProperties</li>
+ * </ul>
+ */
+ @Test
+ public void testProfileContentWithBaseClassPropertyWithoutInheritedProperties() {
+ UMLStereotypePropertyContentProvider provider = new UMLStereotypePropertyContentProvider(true);
+ provider.setProfiles(Collections.singletonList(rootProfile));
+ //we test the root
+ Object[] elements = provider.getElements();
+ Assert.assertEquals(1, elements.length);
+ Assert.assertEquals(elements[0], rootProfile);
+
+ //we test the first level of children
+ Assert.assertEquals(true, provider.hasChildren(rootProfile));
+ List<?> children = Arrays.asList(provider.getChildren(rootProfile));
+
+ Assert.assertEquals(2, children.size());
+ Assert.assertTrue(children.contains(subProfile1));
+ Assert.assertTrue(children.contains(subProfile2));
+
+
+ //we test the children of the first subprofile
+ Assert.assertEquals(true, provider.hasChildren(subProfile1));
+ children = Arrays.asList(provider.getChildren(subProfile1));
+ Assert.assertEquals(1, children.size());
+ Assert.assertTrue(children.contains(ste1));
+
+ //we test the children of the ste1
+ Assert.assertEquals(true, provider.hasChildren(ste1));
+ children = Arrays.asList(provider.getChildren(ste1));
+ Assert.assertEquals(2, children.size());
+ Assert.assertTrue(children.contains(prop1));
+ Assert.assertTrue(children.contains(basePropSte1));
+
+ //we test the children of the prop1
+ Assert.assertEquals(false, provider.hasChildren(prop1));
+
+
+ //we test the children of the 2nd subprofile
+ Assert.assertEquals(true, provider.hasChildren(subProfile2));
+ children = Arrays.asList(provider.getChildren(subProfile2));
+ Assert.assertEquals(1, children.size());
+ Assert.assertTrue(children.contains(ste2));
+
+ //we test the children of the ste2
+ Assert.assertEquals(true, provider.hasChildren(ste2));
+ children = Arrays.asList(provider.getChildren(ste2));
+ Assert.assertEquals(2, children.size());
+ Assert.assertTrue(children.contains(prop2));
+ Assert.assertTrue(children.contains(basePropSte2));
+
+ //we test the children of the prop2
+ Assert.assertEquals(false, provider.hasChildren(prop2));
+ }
+
+ /**
+ *
+ */
+ @After
+ public void enfOfTests() {
+ rootProfile = null;
+ subProfile1 = null;
+ ste1 = null;
+ prop1 = null;
+ basePropSte1 = null;
+ subProfile2 = null;
+ ste2 = null;
+ prop2 = null;
+ basePropSte2 = null;
+
+ }
+
+}

Back to the top