diff --git a/core/plugins/org.polarsys.capella.core.data.cs.validation/src/org/polarsys/capella/core/data/cs/validation/interface_/CE_EIsSameAsItsFEsEIs.java b/core/plugins/org.polarsys.capella.core.data.cs.validation/src/org/polarsys/capella/core/data/cs/validation/interface_/CE_EIsSameAsItsFEsEIs.java index caf963d28e..ee8fdd2fca 100755 --- a/core/plugins/org.polarsys.capella.core.data.cs.validation/src/org/polarsys/capella/core/data/cs/validation/interface_/CE_EIsSameAsItsFEsEIs.java +++ b/core/plugins/org.polarsys.capella.core.data.cs.validation/src/org/polarsys/capella/core/data/cs/validation/interface_/CE_EIsSameAsItsFEsEIs.java @@ -28,7 +28,7 @@ import org.polarsys.capella.core.validation.rule.AbstractValidationRuleOnSystemAnalysis; /** - * ATM_CMATS_SA_R39 : The CE EI shall be the union of the EI of the FE allocated to the CE + * The CE EI shall be the union of the EI of the FE allocated to the CE */ public class CE_EIsSameAsItsFEsEIs extends AbstractValidationRuleOnSystemAnalysis { diff --git a/core/plugins/org.polarsys.capella.core.data.cs.validation/src/org/polarsys/capella/core/data/cs/validation/interface_/InterfaceEIsSameAsItsCEsEIs.java b/core/plugins/org.polarsys.capella.core.data.cs.validation/src/org/polarsys/capella/core/data/cs/validation/interface_/InterfaceEIsSameAsItsCEsEIs.java index b2ab5e9b9f..43d2f9ef00 100755 --- a/core/plugins/org.polarsys.capella.core.data.cs.validation/src/org/polarsys/capella/core/data/cs/validation/interface_/InterfaceEIsSameAsItsCEsEIs.java +++ b/core/plugins/org.polarsys.capella.core.data.cs.validation/src/org/polarsys/capella/core/data/cs/validation/interface_/InterfaceEIsSameAsItsCEsEIs.java @@ -28,7 +28,7 @@ import org.polarsys.capella.core.validation.rule.AbstractValidationRuleOnSystemAnalysis; /** - * ATM_CMATS_SA_R39 : The interface EI shall be identical at SA to the CE EI allocated. + * The interface EI shall be identical at SA to the CE EI allocated. */ public class InterfaceEIsSameAsItsCEsEIs extends AbstractValidationRuleOnSystemAnalysis { diff --git a/core/plugins/org.polarsys.capella.core.data.ctx.validation/src/org/polarsys/capella/core/data/ctx/validation/systemFunction/DSC_SystemFunction.java b/core/plugins/org.polarsys.capella.core.data.ctx.validation/src/org/polarsys/capella/core/data/ctx/validation/systemFunction/DSC_SystemFunction.java index 1ba9f1eca7..fe5ae9f2cc 100755 --- a/core/plugins/org.polarsys.capella.core.data.ctx.validation/src/org/polarsys/capella/core/data/ctx/validation/systemFunction/DSC_SystemFunction.java +++ b/core/plugins/org.polarsys.capella.core.data.ctx.validation/src/org/polarsys/capella/core/data/ctx/validation/systemFunction/DSC_SystemFunction.java @@ -13,18 +13,11 @@ *******************************************************************************/ package org.polarsys.capella.core.data.ctx.validation.systemFunction; -import org.eclipse.emf.ecore.EObject; import org.polarsys.capella.core.validation.rule.AbstractDescriptionCheckingRule; -import org.polarsys.capella.core.validation.rule.AbstractValidationRuleOnSystemAnalysis; /** * Functions should have a description */ public class DSC_SystemFunction extends AbstractDescriptionCheckingRule { - - @Override - protected boolean isApplicable(final EObject eObj) { - return AbstractValidationRuleOnSystemAnalysis.belongsToSA(eObj); - } - + // Empty class, needed for reference in the plugin definition. } diff --git a/core/plugins/org.polarsys.capella.core.data.ctx.validation/src/org/polarsys/capella/core/data/ctx/validation/systemFunction/FunctionNameUnicity.java b/core/plugins/org.polarsys.capella.core.data.ctx.validation/src/org/polarsys/capella/core/data/ctx/validation/systemFunction/FunctionNameUnicity.java index 7a72d77b63..41aea25362 100755 --- a/core/plugins/org.polarsys.capella.core.data.ctx.validation/src/org/polarsys/capella/core/data/ctx/validation/systemFunction/FunctionNameUnicity.java +++ b/core/plugins/org.polarsys.capella.core.data.ctx.validation/src/org/polarsys/capella/core/data/ctx/validation/systemFunction/FunctionNameUnicity.java @@ -18,7 +18,7 @@ import org.polarsys.capella.core.validation.rule.AbstractNameUnicity; /** - * Functional Chains shall start from an End User and finish with an End User + * Function name shall be unique */ public class FunctionNameUnicity extends AbstractNameUnicity { diff --git a/core/plugins/org.polarsys.capella.core.data.fa.validation/plugin.xml b/core/plugins/org.polarsys.capella.core.data.fa.validation/plugin.xml index 078e190f9a..bdab6844c0 100644 --- a/core/plugins/org.polarsys.capella.core.data.fa.validation/plugin.xml +++ b/core/plugins/org.polarsys.capella.core.data.fa.validation/plugin.xml @@ -1205,7 +1205,7 @@ ComponentExchangeFunctionalExchangeAllocation ComponentExchange and FunctionalEx + + FC_1 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_1/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_1/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_1/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_1/FC_1.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_1/FC_1.afm new file mode 100755 index 0000000000..be8c1a4f1d --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_1/FC_1.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_1/FC_1.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_1/FC_1.aird new file mode 100755 index 0000000000..a588167f19 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_1/FC_1.aird @@ -0,0 +1,189 @@ + + + + FC_1.afm + FC_1.capella + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_1/FC_1.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_1/FC_1.capella new file mode 100755 index 0000000000..f78a9fe27e --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_1/FC_1.capella @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/.project new file mode 100755 index 0000000000..46d293d2ff --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/.project @@ -0,0 +1,12 @@ + + + FC_10 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/FC_10.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/FC_10.afm new file mode 100755 index 0000000000..e6744a0c4e --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/FC_10.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/FC_10.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/FC_10.aird new file mode 100755 index 0000000000..6804fce9b0 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/FC_10.aird @@ -0,0 +1,103 @@ + + + + FC_10.afm + FC_10.capella + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/FC_10.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/FC_10.capella new file mode 100755 index 0000000000..7f18afec18 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_10/FC_10.capella @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/.project new file mode 100755 index 0000000000..b84dcd6c1c --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/.project @@ -0,0 +1,12 @@ + + + FC_11 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/FC_11.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/FC_11.afm new file mode 100755 index 0000000000..8f43bc495e --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/FC_11.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/FC_11.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/FC_11.aird new file mode 100755 index 0000000000..16874fb7e6 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/FC_11.aird @@ -0,0 +1,119 @@ + + + + FC_11.afm + FC_11.capella + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/FC_11.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/FC_11.capella new file mode 100755 index 0000000000..f822a379d1 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_11/FC_11.capella @@ -0,0 +1,264 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/.project new file mode 100755 index 0000000000..63247fa00e --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/.project @@ -0,0 +1,12 @@ + + + FC_12 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/FC_12.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/FC_12.afm new file mode 100755 index 0000000000..b9d1cec182 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/FC_12.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/FC_12.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/FC_12.aird new file mode 100755 index 0000000000..4fe99f7bdd --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/FC_12.aird @@ -0,0 +1,343 @@ + + + + FC_12.afm + FC_12.capella + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/FC_12.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/FC_12.capella new file mode 100755 index 0000000000..b131c50415 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_12/FC_12.capella @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/.project new file mode 100755 index 0000000000..e6e7c0d523 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/.project @@ -0,0 +1,12 @@ + + + FC_13 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/FC_13.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/FC_13.afm new file mode 100755 index 0000000000..3b88425bdd --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/FC_13.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/FC_13.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/FC_13.aird new file mode 100755 index 0000000000..959bb6e1de --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/FC_13.aird @@ -0,0 +1,667 @@ + + + + FC_13.afm + FC_13.capella + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/FC_13.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/FC_13.capella new file mode 100755 index 0000000000..bd063020b6 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_13/FC_13.capella @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/.project new file mode 100755 index 0000000000..ff20fa1a77 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/.project @@ -0,0 +1,12 @@ + + + FC_14 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/FC_14.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/FC_14.afm new file mode 100755 index 0000000000..62b51c8171 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/FC_14.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/FC_14.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/FC_14.aird new file mode 100755 index 0000000000..57eb7187bb --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/FC_14.aird @@ -0,0 +1,331 @@ + + + + FC_14.afm + FC_14.capella + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/FC_14.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/FC_14.capella new file mode 100755 index 0000000000..d2a3d0bc24 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_14/FC_14.capella @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/.project new file mode 100755 index 0000000000..195180dff7 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/.project @@ -0,0 +1,12 @@ + + + FC_15 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/FC_15.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/FC_15.afm new file mode 100755 index 0000000000..a3248f331a --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/FC_15.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/FC_15.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/FC_15.aird new file mode 100755 index 0000000000..5f413547cb --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/FC_15.aird @@ -0,0 +1,331 @@ + + + + FC_15.afm + FC_15.capella + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/FC_15.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/FC_15.capella new file mode 100755 index 0000000000..f78ddd37d3 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_15/FC_15.capella @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/.project new file mode 100755 index 0000000000..c26c306531 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/.project @@ -0,0 +1,12 @@ + + + FC_2 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/FC_2.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/FC_2.afm new file mode 100755 index 0000000000..d3053a8ac4 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/FC_2.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/FC_2.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/FC_2.aird new file mode 100755 index 0000000000..afc6dfa1bd --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/FC_2.aird @@ -0,0 +1,365 @@ + + + + FC_2.afm + FC_2.capella + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/FC_2.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/FC_2.capella new file mode 100755 index 0000000000..dca8551d57 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_2/FC_2.capella @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/.project new file mode 100755 index 0000000000..be6542e13c --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/.project @@ -0,0 +1,12 @@ + + + FC_3 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/FC_3.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/FC_3.afm new file mode 100755 index 0000000000..280bb0e9e0 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/FC_3.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/FC_3.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/FC_3.aird new file mode 100755 index 0000000000..25b44b73b3 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/FC_3.aird @@ -0,0 +1,621 @@ + + + + FC_3.afm + FC_3.capella + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/FC_3.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/FC_3.capella new file mode 100755 index 0000000000..3082beabbd --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_3/FC_3.capella @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/.project new file mode 100755 index 0000000000..f4b67c984a --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/.project @@ -0,0 +1,12 @@ + + + FC_4 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/FC_4.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/FC_4.afm new file mode 100755 index 0000000000..dd2d731749 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/FC_4.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/FC_4.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/FC_4.aird new file mode 100755 index 0000000000..399f9b407e --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/FC_4.aird @@ -0,0 +1,253 @@ + + + + FC_4.afm + FC_4.capella + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/FC_4.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/FC_4.capella new file mode 100755 index 0000000000..ca486f1c84 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_4/FC_4.capella @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/.project new file mode 100755 index 0000000000..a520d1d23f --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/.project @@ -0,0 +1,12 @@ + + + FC_5 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/FC_5.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/FC_5.afm new file mode 100755 index 0000000000..69fc035d33 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/FC_5.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/FC_5.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/FC_5.aird new file mode 100755 index 0000000000..dcd99b9cb4 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/FC_5.aird @@ -0,0 +1,622 @@ + + + + FC_5.afm + FC_5.capella + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/FC_5.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/FC_5.capella new file mode 100755 index 0000000000..159764576b --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_5/FC_5.capella @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/.project new file mode 100755 index 0000000000..9c998051d5 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/.project @@ -0,0 +1,12 @@ + + + FC_6 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/FC_6.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/FC_6.afm new file mode 100755 index 0000000000..980de69f1a --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/FC_6.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/FC_6.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/FC_6.aird new file mode 100755 index 0000000000..95f4e6e10b --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/FC_6.aird @@ -0,0 +1,311 @@ + + + + FC_6.afm + FC_6.capella + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/FC_6.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/FC_6.capella new file mode 100755 index 0000000000..a9dc69dfa6 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_6/FC_6.capella @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/.project new file mode 100755 index 0000000000..e9cd83af96 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/.project @@ -0,0 +1,12 @@ + + + FC_7 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/FC_7.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/FC_7.afm new file mode 100755 index 0000000000..0931b280d3 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/FC_7.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/FC_7.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/FC_7.aird new file mode 100755 index 0000000000..e373a451b3 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/FC_7.aird @@ -0,0 +1,425 @@ + + + + FC_7.afm + FC_7.capella + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/FC_7.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/FC_7.capella new file mode 100755 index 0000000000..bb40909a59 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_7/FC_7.capella @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/.project new file mode 100755 index 0000000000..bdb5f51cdb --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/.project @@ -0,0 +1,12 @@ + + + FC_8 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/FC_8.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/FC_8.afm new file mode 100755 index 0000000000..c1be0a9225 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/FC_8.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/FC_8.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/FC_8.aird new file mode 100755 index 0000000000..0839769596 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/FC_8.aird @@ -0,0 +1,311 @@ + + + + FC_8.afm + FC_8.capella + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/FC_8.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/FC_8.capella new file mode 100755 index 0000000000..c794df9954 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_8/FC_8.capella @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/.project b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/.project new file mode 100755 index 0000000000..ecf0db1805 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/.project @@ -0,0 +1,12 @@ + + + FC_9 + + + + + + + org.polarsys.capella.project.nature + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/.settings/org.eclipse.core.resources.prefs b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 0000000000..4824b80263 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/FC_9.afm b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/FC_9.afm new file mode 100755 index 0000000000..3e39717b59 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/FC_9.afm @@ -0,0 +1,4 @@ + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/FC_9.aird b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/FC_9.aird new file mode 100755 index 0000000000..6c301d6d6f --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/FC_9.aird @@ -0,0 +1,431 @@ + + + + FC_9.afm + FC_9.capella + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_RATIO + KEEP_SIZE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/FC_9.capella b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/FC_9.capella new file mode 100755 index 0000000000..bc555a7fc1 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/model/FC_9/FC_9.capella @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/FunctionalTestSuite.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/FunctionalTestSuite.java new file mode 100755 index 0000000000..4b727a4b0a --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/FunctionalTestSuite.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional; + +import java.util.ArrayList; +import java.util.List; + +import org.polarsys.capella.test.framework.api.BasicTestArtefact; +import org.polarsys.capella.test.framework.api.BasicTestSuite; +import org.polarsys.capella.test.validation.rules.ju.testcases.functional.functional.*; +import org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalChains.*; +import org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence.*; + +import junit.framework.Test; + +public class FunctionalTestSuite extends BasicTestSuite { + + /** + * Returns the suite. This is required to unary launch this test. + */ + public static Test suite() { + return new FunctionalTestSuite(); + } + + /** + * @see org.polarsys.capella.test.framework.api.BasicTestSuite#getTests() + */ + protected List getTests() { + List tests = new ArrayList(); + tests.add(new Rule_F_1_TestCase()); + tests.add(new Rule_FCH_1_TestCase()); + tests.add(new Rule_FC_1_TestCase()); + tests.add(new Rule_FC_2_TestCase()); + tests.add(new Rule_FC_3_TestCase()); + tests.add(new Rule_FC_4_TestCase()); + tests.add(new Rule_FC_5_TestCase()); + tests.add(new Rule_FC_6_TestCase()); + tests.add(new Rule_FC_7_TestCase()); + tests.add(new Rule_FC_8_TestCase()); + tests.add(new Rule_FC_9_TestCase()); + tests.add(new Rule_FC_10_TestCase()); + tests.add(new Rule_FC_11_TestCase()); + tests.add(new Rule_FC_12_TestCase()); + tests.add(new Rule_FC_13_TestCase()); + tests.add(new Rule_FC_14_TestCase()); + tests.add(new Rule_FC_15_TestCase()); + return tests; + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functional/Rule_F_1_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functional/Rule_F_1_TestCase.java new file mode 100755 index 0000000000..8ce741f66a --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functional/Rule_F_1_TestCase.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functional; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.ctx.CtxFactory; +import org.polarsys.capella.core.data.ctx.SystemFunction; +import org.polarsys.capella.core.data.fa.FaFactory; +import org.polarsys.capella.core.data.fa.FunctionInputPort; +import org.polarsys.capella.core.data.fa.FunctionOutputPort; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ports are not allowed on non-leaf functions + * (meaning that a functional exchange has not been allocated down to a leaf function). + */ +public class Rule_F_1_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.fa.validation.F_1" }); + } + + public void Rule_F_1_TestCase_OK() { + final FunctionInputPort functionInputPort = FaFactory.eINSTANCE.createFunctionInputPort(); + final FunctionOutputPort functionOutputPort = FaFactory.eINSTANCE.createFunctionOutputPort(); + + final SystemFunction sysFunction = CtxFactory.eINSTANCE.createSystemFunction(); + sysFunction.getInputs().add(functionInputPort); + sysFunction.getOutputs().add(functionOutputPort); + + ok(functionInputPort); + ok(functionOutputPort); + } + + /** + * + */ + public void Rule_F_1_TestCase_KO() { + final FunctionInputPort functionInputPort = FaFactory.eINSTANCE.createFunctionInputPort(); + final FunctionOutputPort functionOutputPort = FaFactory.eINSTANCE.createFunctionOutputPort(); + + final SystemFunction sysFunction = CtxFactory.eINSTANCE.createSystemFunction(); + sysFunction.getInputs().add(functionInputPort); + sysFunction.getOutputs().add(functionOutputPort); + + // Make sysFunction an non-leaf function, by assigning it a sub-function + final SystemFunction subSysFunction = CtxFactory.eINSTANCE.createSystemFunction(); + sysFunction.getOwnedFunctions().add(subSysFunction); + + ko(functionInputPort); + ko(functionOutputPort); + } + + @Override + public void test() throws Exception { + Rule_F_1_TestCase_OK(); + Rule_F_1_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalChains/Rule_FCH_1_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalChains/Rule_FCH_1_TestCase.java new file mode 100755 index 0000000000..e4300af78b --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalChains/Rule_FCH_1_TestCase.java @@ -0,0 +1,72 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalChains; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.ctx.CtxFactory; +import org.polarsys.capella.core.data.ctx.SystemFunction; +import org.polarsys.capella.core.data.fa.FaFactory; +import org.polarsys.capella.core.data.fa.FunctionalChain; +import org.polarsys.capella.core.data.fa.FunctionalChainInvolvementFunction; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * FunctionalChain should involve only leaf functions. + */ +public class Rule_FCH_1_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.fa.validation.FCH_1" }); + } + + public void Rule_FCH_1_TestCase_OK() { + final FunctionalChain fc = FaFactory.eINSTANCE.createFunctionalChain(); + + final FunctionalChainInvolvementFunction fcif = FaFactory.eINSTANCE.createFunctionalChainInvolvementFunction(); + fc.getOwnedFunctionalChainInvolvements().add(fcif); + + final SystemFunction sysFunction = CtxFactory.eINSTANCE.createSystemFunction(); + fcif.setInvolved(sysFunction); + + ok(fc); + } + + /** + * + */ + public void Rule_FCH_1_TestCase_KO() { + final FunctionalChain fc = FaFactory.eINSTANCE.createFunctionalChain(); + + final FunctionalChainInvolvementFunction fcif = FaFactory.eINSTANCE.createFunctionalChainInvolvementFunction(); + fc.getOwnedFunctionalChainInvolvements().add(fcif); + + final SystemFunction sysFunction = CtxFactory.eINSTANCE.createSystemFunction(); + fcif.setInvolved(sysFunction); + + // Make sysFunction an non-leaf function, by assigning it a sub-function + final SystemFunction subSysFunction = CtxFactory.eINSTANCE.createSystemFunction(); + sysFunction.getOwnedFunctions().add(subSysFunction); + + ko(fc); + } + + @Override + public void test() throws Exception { + Rule_FCH_1_TestCase_OK(); + Rule_FCH_1_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_10_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_10_TestCase.java new file mode 100755 index 0000000000..77ba9f50cc --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_10_TestCase.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.ctx.CtxPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * Function name shall be unique + */ +public class Rule_FC_10_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_10"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return CtxPackage.Literals.SYSTEM_FUNCTION; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.ctx.validation.FC_10"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + + // This rule will not report on first element (as a taboo-list is built step by step), + new OracleDefinition("335661fb-b3a3-4f67-8dc8-8dc5ea9b9096", 0), //$NON-NLS-1$ + + // !!! here, nbExpectedErrors should be == 1, but is set to == 0 + // because this Rule's context should persist for all oracle's objectID, + // but it does not, so the Rule do not report problems + new OracleDefinition("e220576b-e769-4ed5-b4a1-5f083e79fa16", 0), //$NON-NLS-1$ + + new OracleDefinition("bb14280e-6a8e-4268-9884-881d892b815f", 0), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_11_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_11_TestCase.java new file mode 100755 index 0000000000..198dd65836 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_11_TestCase.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.ctx.CtxPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * Actors name shall be unique + */ +public class Rule_FC_11_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_11"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return CtxPackage.Literals.SYSTEM_COMPONENT; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.cs.validation.FC_11"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + + // This rule will not report on first element (as a taboo-list is built step by step), + new OracleDefinition("271a1737-da5b-45e7-97d7-ed026534c9f0", 0), //$NON-NLS-1$ + + new OracleDefinition("272477d3-258f-4ab8-ba0a-2b3f3885a54d", 0), //$NON-NLS-1$ + + // !!! here, nbExpectedErrors should be == 1, but is set to == 0 + // because this Rule's context should persist for all oracle's objectID, + // but it does not, so the Rule do not report problems + new OracleDefinition("51abde22-c6f6-4cfc-b480-53691e6ed112", 0), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_12_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_12_TestCase.java new file mode 100755 index 0000000000..5262741704 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_12_TestCase.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.cs.CsPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * The interface EI shall be identical at SA to the CE EI allocated. + */ +public class Rule_FC_12_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_12"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return CsPackage.Literals.INTERFACE; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.cs.validation.FC_12"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + new OracleDefinition("27657102-d96d-4a61-9726-d9f95091a41d", 0), //$NON-NLS-1$ + new OracleDefinition("608eadd0-f8c8-458c-8aa0-9b3eddbeca0b", 1), //$NON-NLS-1$ + new OracleDefinition("b23ccb60-a60e-4a8a-8a27-c05019047334", 1), //$NON-NLS-1$ + new OracleDefinition("27587cfb-f2ed-4834-a002-8af7a8d5d9b3", 0), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_13_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_13_TestCase.java new file mode 100755 index 0000000000..3a09f3041b --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_13_TestCase.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.fa.FaPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * The CE EI shall be the union of the EI of the FE allocated to the CE + */ +public class Rule_FC_13_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_13"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return FaPackage.Literals.COMPONENT_EXCHANGE; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.fa.validation.FC_13"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + new OracleDefinition("c8de6301-15e8-424c-80e7-53adcab18e00", 0), //$NON-NLS-1$ + new OracleDefinition("5cd0ebb2-5b7e-4401-b5a8-833b89e53757", 1), //$NON-NLS-1$ + new OracleDefinition("469bd6ff-d6fa-44de-80c1-282732483fdc", 0), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_14_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_14_TestCase.java new file mode 100755 index 0000000000..d7a1eee3ec --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_14_TestCase.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.fa.FaPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * FunctionalExchanges incoming with same name must use same port + */ +public class Rule_FC_14_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_14"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return FaPackage.Literals.FUNCTIONAL_EXCHANGE; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.fa.validation.FC_14"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + new OracleDefinition("b90954ef-0c13-4e20-8ea6-6755ca875796", 0), //$NON-NLS-1$ + new OracleDefinition("b4230119-426b-491a-903f-0b0de785fc01", 0), //$NON-NLS-1$ + + // !!! here, nbExpectedErrors should be == 1, but is set to == 0 + // because this Rule's context should persist for all oracle's objectID, + // but it does not, so the Rule do not report problems + new OracleDefinition("d11465ba-1e8d-4dd4-8fb1-1be5435ff1b3", 0), //$NON-NLS-1$ + + // !!! here, nbExpectedErrors should be == 1, but is set to == 0 + // because this Rule's context should persist for all oracle's objectID, + // but it does not, so the Rule do not report problems + new OracleDefinition("2c75421e-5b29-47ce-ae61-c84e1fad1436", 0), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_15_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_15_TestCase.java new file mode 100755 index 0000000000..07eff99693 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_15_TestCase.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.fa.FaPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * FunctionalExchanges outgoing with same name must use same port + */ +public class Rule_FC_15_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_15"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return FaPackage.Literals.FUNCTIONAL_EXCHANGE; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.fa.validation.FC_15"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + new OracleDefinition("a0831b1f-d2a0-4465-b8e6-8c10107d103c", 0), //$NON-NLS-1$ + new OracleDefinition("99b29b32-4f1e-40c0-82ef-baa6b7d97c44", 0), //$NON-NLS-1$ + + // !!! here, nbExpectedErrors should be == 1, but is set to == 0 + // because this Rule's context should persist for all oracle's objectID, + // but it does not, so the Rule do not report problems + new OracleDefinition("d80f2551-e8f7-4378-91ac-5c3991588b31", 0), //$NON-NLS-1$ + + // !!! here, nbExpectedErrors should be == 1, but is set to == 0 + // because this Rule's context should persist for all oracle's objectID, + // but it does not, so the Rule do not report problems + new OracleDefinition("61160f24-d85e-4288-9f4d-b2dabb72a785", 0), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_1_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_1_TestCase.java new file mode 100755 index 0000000000..25528ef1ae --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_1_TestCase.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.cs.CsPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * Components and actors should be connected by at least one CE + */ +public class Rule_FC_1_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_1"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return CsPackage.Literals.COMPONENT; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.cs.validation.FC_1"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + new OracleDefinition(/*LA_1*/"a1e016eb-4521-4154-b4a5-3b2bc42739d0", 0), //$NON-NLS-1$ + new OracleDefinition(/*LC 1*/"2821bd52-df6c-47a6-acdc-93a771a2310f", 0), //$NON-NLS-1$ + new OracleDefinition(/*LA_2*/"6a8d1055-8943-4b30-9885-3ad00fe3c6d6", 1), //$NON-NLS-1$ + new OracleDefinition(/*LC 2*/"5dfa6515-53cb-46a0-945c-c6ad0c3d7bee", 1), //$NON-NLS-1$ + // Elements to ignore, + new OracleDefinition(/*CtxSystem*/ "0d1a7ee3-3b2b-4a00-be3c-bd56940da7aa", 1), //$NON-NLS-1$ + new OracleDefinition(/*LogicalSystem*/ "7235d684-303b-4275-85ce-b0e34b7114aa", 1), //$NON-NLS-1$ + new OracleDefinition(/*PhysicalSystem*/"9eb201aa-9e19-46fc-ba96-547c240576ec", 1), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_2_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_2_TestCase.java new file mode 100755 index 0000000000..f86a249c7b --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_2_TestCase.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.fa.FaPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * CE should have at least one allocated FE + */ +public class Rule_FC_2_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_2"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return FaPackage.Literals.COMPONENT_EXCHANGE; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.fa.validation.FC_2"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + new OracleDefinition(/*C 1*/"348a8f28-60bf-4590-8490-10e8035436d8", 0), //$NON-NLS-1$ + new OracleDefinition(/*C 2*/"98ee15f6-e056-4d0f-96a1-6e42c93dbd0f", 1), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_3_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_3_TestCase.java new file mode 100755 index 0000000000..f35c1bc02a --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_3_TestCase.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.fa.FaPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * FE between components/actors should be allocated to CE + * Note: not tested when connected to an actor whose name contains:'User' (case-sensitive). + */ +public class Rule_FC_3_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_3"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return FaPackage.Literals.FUNCTIONAL_EXCHANGE; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.fa.validation.FC_3"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + new OracleDefinition(/*FE_1*/"4fef2cc4-7e08-48f0-9ee6-4c94c6ec482b", 0), //$NON-NLS-1$ + new OracleDefinition(/*FE_2*/"8badb742-5b8d-45d1-9344-1cbd7c82ce69", 1), //$NON-NLS-1$ + new OracleDefinition(/*FE_3*/"63e64592-3095-40a3-b36a-a6bb39dad27a", 1), //$NON-NLS-1$ + new OracleDefinition(/*FE_4*/"33dacf70-bf6a-4aa8-9fd4-5357a395d310", 0), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_4_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_4_TestCase.java new file mode 100755 index 0000000000..7fe498c2ac --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_4_TestCase.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.fa.FaPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * Port with CE should have provided/required Interface + */ +public class Rule_FC_4_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_4"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return FaPackage.Literals.COMPONENT_PORT; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.fa.validation.FC_4"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + new OracleDefinition(/*CP_1_OUT*/"c946d772-c2e3-427d-8c79-8cbb099a7d0a", 0), //$NON-NLS-1$ + new OracleDefinition(/*CP_2_OUT*/"169e1ff9-29ff-497e-887b-fab3cca0d4ac", 1), //$NON-NLS-1$ + new OracleDefinition(/*CP_3_OUT*/"e91bdb07-39bb-47b2-8691-9c6fa6a1d063", 0), //$NON-NLS-1$ + new OracleDefinition(/*CP_1_IN*/ "2a0c07ff-e174-492b-8591-befcebb08abb", 0), //$NON-NLS-1$ + new OracleDefinition(/*CP_2_IN*/ "379763cf-b568-4964-9906-cb9ca1f264dd", 1), //$NON-NLS-1$ + new OracleDefinition(/*CP_3_IN*/ "87086631-fa4d-44a5-b0d0-d3e6a459d28c", 0), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_5_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_5_TestCase.java new file mode 100755 index 0000000000..6202273a40 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_5_TestCase.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.fa.FaPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * FunctionalExchange allocated to a CE should have one or more Exchanged Items + */ +public class Rule_FC_5_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_5"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return FaPackage.Literals.FUNCTIONAL_EXCHANGE; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.fa.validation.FC_5"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + new OracleDefinition("31b4a642-5259-4501-8a44-9f756130706a", 0), //$NON-NLS-1$ + new OracleDefinition("f31b4c4a-862f-4dfb-972e-08910e33c86a", 1), //$NON-NLS-1$ + new OracleDefinition("4b4d7a86-ad91-4983-b05c-10dbda34789a", 0), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_6_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_6_TestCase.java new file mode 100755 index 0000000000..72219e8ba6 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_6_TestCase.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.fa.FaPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * FunctionalExchanges on same input port must have same name + */ +public class Rule_FC_6_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_6"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return FaPackage.Literals.FUNCTIONAL_EXCHANGE; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.fa.validation.FC_6"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + new OracleDefinition("90ef8f1f-85ec-49dc-bbb7-05ccbefb3331", 0), //$NON-NLS-1$ + new OracleDefinition("6ebbf6b7-729f-4548-8eea-3fdade55ef20", 0), //$NON-NLS-1$ + new OracleDefinition("5258f13c-5a43-4854-a1e1-40f62fc53bb5", 1), //$NON-NLS-1$ + new OracleDefinition("fccde691-070c-4a47-a32d-ee26b38566f6", 1), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_7_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_7_TestCase.java new file mode 100755 index 0000000000..409e3511c8 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_7_TestCase.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.fa.FaPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * FunctionalExchanges on same input port must have same EI + */ +public class Rule_FC_7_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_7"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return FaPackage.Literals.FUNCTIONAL_EXCHANGE; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.fa.validation.FC_7"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + new OracleDefinition("a5334ed3-61c5-4672-88d4-3cbb22efdd14", 0), //$NON-NLS-1$ + new OracleDefinition("a421f829-48a5-4c99-9f92-f2943404146c", 0), //$NON-NLS-1$ + new OracleDefinition("77607e2f-b32f-420e-9bc7-0ce258959888", 1), //$NON-NLS-1$ + new OracleDefinition("630d2b62-bd33-452b-8c06-12e0998ec128", 1), //$NON-NLS-1$ + new OracleDefinition("e5c1228b-dc53-4ad6-800c-faad17e92911", 0), //$NON-NLS-1$ + new OracleDefinition("734a2541-e388-44a6-b64a-7890abb6bfce", 0), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_8_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_8_TestCase.java new file mode 100755 index 0000000000..b95ddd3f59 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_8_TestCase.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.fa.FaPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * FunctionalExchanges on same output port must have same name + */ +public class Rule_FC_8_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_8"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return FaPackage.Literals.FUNCTIONAL_EXCHANGE; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.fa.validation.FC_8"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + new OracleDefinition("f61445f9-0607-45ee-94c0-f88e79eb4c3f", 0), //$NON-NLS-1$ + new OracleDefinition("6a74b49c-2e66-4fa2-9bea-d61891a88628", 0), //$NON-NLS-1$ + new OracleDefinition("14970c14-45d9-491a-a720-41722ae84b21", 1), //$NON-NLS-1$ + new OracleDefinition("4b39255f-9563-4da1-ab56-5eb6db473183", 1), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_9_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_9_TestCase.java new file mode 100755 index 0000000000..d73530e592 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/functional/functionalCoherence/Rule_FC_9_TestCase.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.functional.functionalCoherence; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.polarsys.capella.core.data.fa.FaPackage; +import org.polarsys.capella.test.framework.api.OracleDefinition; +import org.polarsys.capella.test.validation.rules.ju.testcases.ValidationRuleTestCase; + +/** + * FunctionalExchanges on same output port must have same name + */ +public class Rule_FC_9_TestCase extends ValidationRuleTestCase { + + @Override + protected String getRequiredTestModel() { + return "FC_9"; //$NON-NLS-1$ + } + + @Override + protected EClass getTargetedEClass() { + return FaPackage.Literals.FUNCTIONAL_EXCHANGE; + } + + @Override + protected String getRuleID() { + return "org.polarsys.capella.core.data.fa.validation.FC_9"; //$NON-NLS-1$ + } + + @Override + protected List getOracleDefinitions() { + return Arrays.asList(new OracleDefinition[] { + // Elements of interest for OK and KO patterns, + new OracleDefinition("b5db1c2b-38b2-40e5-a0b7-249176168119", 0), //$NON-NLS-1$ + new OracleDefinition("dfbc5cf6-c477-4474-9984-9cb5c964f3f8", 0), //$NON-NLS-1$ + new OracleDefinition("d7797d56-666d-491c-bb54-b9b01c715ec4", 0), //$NON-NLS-1$ + new OracleDefinition("b9ddd1fd-58ec-402b-9bc0-122d7e36ca97", 0), //$NON-NLS-1$ + new OracleDefinition("17135c74-1c36-4a45-8559-864d4a04a28a", 1), //$NON-NLS-1$ + new OracleDefinition("c32cfb64-73a8-4f0b-99a6-972591b976c9", 1), //$NON-NLS-1$ + }); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/NamingConventionsTestSuite.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/NamingConventionsTestSuite.java index a5c319b089..318b0c4d1f 100755 --- a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/NamingConventionsTestSuite.java +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/NamingConventionsTestSuite.java @@ -34,7 +34,7 @@ public static Test suite() { */ protected List getTests() { List tests = new ArrayList(); - tests.add(new Rule_NC_2_2_TestCase()); + tests.add(new Rule_NC_1_1_TestCase()); return tests; } diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/Rule_NC_1_1_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/Rule_NC_1_1_TestCase.java new file mode 100755 index 0000000000..1e592c85d3 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/Rule_NC_1_1_TestCase.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.namingConventions; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.information.ExchangeItem; +import org.polarsys.capella.core.data.information.ExchangeItemElement; +import org.polarsys.capella.core.data.information.InformationFactory; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that ExchangeItemElement names are different from the containing ExchangeItem name. + */ +public class Rule_NC_1_1_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.information.validation.NC_1-1" }); + } + + public void Rule_NC_1_1_TestCase_OK() { + final ExchangeItemElement eie_ok = InformationFactory.eINSTANCE.createExchangeItemElement(); + eie_ok.setName("My EIE Name"); + + final ExchangeItem ei = InformationFactory.eINSTANCE.createExchangeItem(); + ei.setName("Another Name for my EI"); + ei.getOwnedElements().add(eie_ok); + + ok(eie_ok); + } + + /** + * + */ + public void Rule_NC_1_1_TestCase_KO() { + final ExchangeItemElement eie_ko = InformationFactory.eINSTANCE.createExchangeItemElement(); + eie_ko.setName("My EIE Name"); + + final ExchangeItem ei = InformationFactory.eINSTANCE.createExchangeItem(); + ei.setName(eie_ko.getName()); + ei.getOwnedElements().add(eie_ko); + + ko(eie_ko); + } + + @Override + public void test() throws Exception { + Rule_NC_1_1_TestCase_OK(); + Rule_NC_1_1_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/Rule_NC_1_2_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/Rule_NC_1_2_TestCase.java new file mode 100755 index 0000000000..0db3277ab1 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/Rule_NC_1_2_TestCase.java @@ -0,0 +1,72 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.namingConventions; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.cs.CsFactory; +import org.polarsys.capella.core.data.cs.ExchangeItemAllocation; +import org.polarsys.capella.core.data.cs.Interface; +import org.polarsys.capella.core.data.information.ExchangeItem; +import org.polarsys.capella.core.data.information.InformationFactory; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that ExchangeItem names are different from the containing Interface name. + */ +public class Rule_NC_1_2_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.information.validation.NC_1-2" }); + } + + public void Rule_NC_1_2_TestCase_OK() { + final ExchangeItem ei_ok = InformationFactory.eINSTANCE.createExchangeItem(); + ei_ok.setName("My EI Name"); + + final ExchangeItemAllocation eia = CsFactory.eINSTANCE.createExchangeItemAllocation(); + eia.setAllocatedItem(ei_ok); + + final Interface intf = CsFactory.eINSTANCE.createInterface(); + intf.setName("Another Name for my Interface"); + intf.getOwnedExchangeItemAllocations().add(eia); + + ok(eia); + } + + /** + * + */ + public void Rule_NC_1_2_TestCase_KO() { + final ExchangeItem ei_ko = InformationFactory.eINSTANCE.createExchangeItem(); + ei_ko.setName("My EI Name"); + + final ExchangeItemAllocation eia = CsFactory.eINSTANCE.createExchangeItemAllocation(); + eia.setAllocatedItem(ei_ko); + + final Interface intf = CsFactory.eINSTANCE.createInterface(); + intf.setName(ei_ko.getName()); + intf.getOwnedExchangeItemAllocations().add(eia); + + ko(eia); + } + + @Override + public void test() throws Exception { + Rule_NC_1_2_TestCase_OK(); + Rule_NC_1_2_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/Rule_NC_1_3_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/Rule_NC_1_3_TestCase.java new file mode 100755 index 0000000000..2fa4dd01fa --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/Rule_NC_1_3_TestCase.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.namingConventions; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.information.Class; +import org.polarsys.capella.core.data.information.InformationFactory; +import org.polarsys.capella.core.data.information.Property; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that Property names are different from the containing Class name. + */ +public class Rule_NC_1_3_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.information.validation.NC_1-3" }); + } + + public void Rule_NC_1_3_TestCase_OK() { + final Property property_ok = InformationFactory.eINSTANCE.createProperty(); + property_ok.setName("My Property Name"); + + final Class parentClass = InformationFactory.eINSTANCE.createClass(); + parentClass.setName("Another Name for parent Class"); + parentClass.getOwnedFeatures().add(property_ok); + + ok(property_ok); + } + + /** + * + */ + public void Rule_NC_1_3_TestCase_KO() { + final Property property_ko = InformationFactory.eINSTANCE.createProperty(); + property_ko.setName("My Property Name"); + + final Class parentClass = InformationFactory.eINSTANCE.createClass(); + parentClass.setName(property_ko.getName()); + parentClass.getOwnedFeatures().add(property_ko); + + ko(property_ko); + } + + @Override + public void test() throws Exception { + Rule_NC_1_3_TestCase_OK(); + Rule_NC_1_3_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/Rule_NC_2_1_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/Rule_NC_2_1_TestCase.java new file mode 100755 index 0000000000..63e346649d --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/namingConventions/Rule_NC_2_1_TestCase.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.namingConventions; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.information.Class; +import org.polarsys.capella.core.data.information.ExchangeItemElement; +import org.polarsys.capella.core.data.information.InformationFactory; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that Exchange Item Element names are different from their Target Type name. + */ +public class Rule_NC_2_1_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.information.validation.NC_2-1" }); + } + + public void Rule_NC_2_1_TestCase_OK() { + final ExchangeItemElement eie_ok = InformationFactory.eINSTANCE.createExchangeItemElement(); + eie_ok.setName("My EIE name"); + + final Class targetClass = InformationFactory.eINSTANCE.createClass(); + targetClass.setName("Another Name for target Class"); + + eie_ok.setAbstractType(targetClass); + + ok(eie_ok); + } + + /** + * + */ + public void Rule_NC_2_1_TestCase_KO() { + final ExchangeItemElement eie_ko = InformationFactory.eINSTANCE.createExchangeItemElement(); + eie_ko.setName("My EIE name"); + + final Class targetClass = InformationFactory.eINSTANCE.createClass(); + targetClass.setName(eie_ko.getName()); + + eie_ko.setAbstractType(targetClass); + + ko(eie_ko); + } + + @Override + public void test() throws Exception { + Rule_NC_2_1_TestCase_OK(); + Rule_NC_2_1_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_10_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_10_TestCase.java new file mode 100755 index 0000000000..687b860bbd --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_10_TestCase.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.ctx.CtxFactory; +import org.polarsys.capella.core.data.ctx.SystemAnalysis; +import org.polarsys.capella.core.data.ctx.SystemComponent; +import org.polarsys.capella.core.data.ctx.SystemComponentPkg; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Actors should have a description + */ +public class Rule_DS_1_10_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.cs.validation.DS_1-10" }); + } + + public void Rule_DS_1_10_TestCase_OK() { + final SystemComponent actor_ok = CtxFactory.eINSTANCE.createSystemComponent(); + actor_ok.setActor(true); + actor_ok.setDescription("My Description"); + + final SystemComponentPkg sysCompPkg = CtxFactory.eINSTANCE.createSystemComponentPkg(); + sysCompPkg.getOwnedSystemComponents().add(actor_ok); + + final SystemAnalysis sa = CtxFactory.eINSTANCE.createSystemAnalysis(); + sa.setOwnedSystemComponentPkg(sysCompPkg); + + ok(actor_ok); + } + + public void Rule_DS_1_10_TestCase_KO() { + final SystemComponent actor_ko_1 = CtxFactory.eINSTANCE.createSystemComponent(); + actor_ko_1.setActor(true); + actor_ko_1.setDescription(null); + + final SystemComponent actor_ko_2 = CtxFactory.eINSTANCE.createSystemComponent(); + actor_ko_2.setActor(true); + actor_ko_2.setDescription(""); + + final SystemComponentPkg sysCompPkg = CtxFactory.eINSTANCE.createSystemComponentPkg(); + sysCompPkg.getOwnedSystemComponents().add(actor_ko_1); + sysCompPkg.getOwnedSystemComponents().add(actor_ko_2); + + final SystemAnalysis sa = CtxFactory.eINSTANCE.createSystemAnalysis(); + sa.setOwnedSystemComponentPkg(sysCompPkg); + + ko(actor_ko_1); + ko(actor_ko_2); + } + + @Override + public void test() throws Exception { + Rule_DS_1_10_TestCase_OK(); + Rule_DS_1_10_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_11_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_11_TestCase.java new file mode 100755 index 0000000000..69063ff478 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_11_TestCase.java @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.ctx.CtxFactory; +import org.polarsys.capella.core.data.ctx.SystemAnalysis; +import org.polarsys.capella.core.data.ctx.SystemComponent; +import org.polarsys.capella.core.data.ctx.SystemComponentPkg; +import org.polarsys.capella.core.data.fa.ComponentExchange; +import org.polarsys.capella.core.data.fa.FaFactory; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * ComponentExchanges should have a description + */ +public class Rule_DS_1_11_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.fa.validation.DS_1-11" }); + } + + public void Rule_DS_1_11_TestCase_OK() { + final ComponentExchange ce_ok = FaFactory.eINSTANCE.createComponentExchange(); + ce_ok.setDescription("My Description"); + + final SystemComponent sysComp = CtxFactory.eINSTANCE.createSystemComponent(); + sysComp.getOwnedComponentExchanges().add(ce_ok); + + final SystemComponentPkg sysCompPkg = CtxFactory.eINSTANCE.createSystemComponentPkg(); + sysCompPkg.getOwnedSystemComponents().add(sysComp); + + final SystemAnalysis sa = CtxFactory.eINSTANCE.createSystemAnalysis(); + sa.setOwnedSystemComponentPkg(sysCompPkg); + + ok(ce_ok); + } + + public void Rule_DS_1_11_TestCase_KO() { + final ComponentExchange ce_ko_1 = FaFactory.eINSTANCE.createComponentExchange(); + ce_ko_1.setDescription(null); + + final ComponentExchange ce_ko_2 = FaFactory.eINSTANCE.createComponentExchange(); + ce_ko_2.setDescription(""); + + final SystemComponent sysComp = CtxFactory.eINSTANCE.createSystemComponent(); + sysComp.getOwnedComponentExchanges().add(ce_ko_1); + sysComp.getOwnedComponentExchanges().add(ce_ko_2); + + final SystemComponentPkg sysCompPkg = CtxFactory.eINSTANCE.createSystemComponentPkg(); + sysCompPkg.getOwnedSystemComponents().add(sysComp); + + final SystemAnalysis sa = CtxFactory.eINSTANCE.createSystemAnalysis(); + sa.setOwnedSystemComponentPkg(sysCompPkg); + + ko(ce_ko_1); + ko(ce_ko_2); + } + + @Override + public void test() throws Exception { + Rule_DS_1_11_TestCase_OK(); + Rule_DS_1_11_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_1_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_1_TestCase.java new file mode 100755 index 0000000000..60d97b2651 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_1_TestCase.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.ctx.CtxFactory; +import org.polarsys.capella.core.data.ctx.SystemComponent; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that Components have a description + */ +public class Rule_DS_1_1_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.cs.validation.DS_1-1" }); + } + + public void Rule_DS_1_1_TestCase_OK() { + final SystemComponent comp = CtxFactory.eINSTANCE.createSystemComponent(); + comp.setDescription("My Description"); + + ok(comp); + } + + public void Rule_DS_1_1_TestCase_KO() { + final SystemComponent comp_1 = CtxFactory.eINSTANCE.createSystemComponent(); + comp_1.setDescription(null); + ko(comp_1); + + final SystemComponent comp_2 = CtxFactory.eINSTANCE.createSystemComponent(); + comp_2.setDescription(""); + ko(comp_2); + } + + @Override + public void test() throws Exception { + Rule_DS_1_1_TestCase_OK(); + Rule_DS_1_1_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_2_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_2_TestCase.java new file mode 100755 index 0000000000..acd24219ff --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_2_TestCase.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.information.Class; +import org.polarsys.capella.core.data.information.InformationFactory; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that Classes have a description + */ +public class Rule_DS_1_2_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.information.validation.DS_1-2" }); + } + + public void Rule_DS_1_2_TestCase_OK() { + final Class class_ok = InformationFactory.eINSTANCE.createClass(); + class_ok.setDescription("My Description"); + + ok(class_ok); + } + + public void Rule_DS_1_2_TestCase_KO() { + final Class class_ko_1 = InformationFactory.eINSTANCE.createClass(); + class_ko_1.setDescription(null); + ko(class_ko_1); + + final Class class_ko_2 = InformationFactory.eINSTANCE.createClass(); + class_ko_2.setDescription(""); + ko(class_ko_2); + } + + @Override + public void test() throws Exception { + Rule_DS_1_2_TestCase_OK(); + Rule_DS_1_2_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_3_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_3_TestCase.java new file mode 100755 index 0000000000..951f7a3c0c --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_3_TestCase.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.information.ExchangeItemElement; +import org.polarsys.capella.core.data.information.InformationFactory; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that Exchange Item Elements have a description + */ +public class Rule_DS_1_3_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.information.validation.DS_1-3" }); + } + + public void Rule_DS_1_3_TestCase_OK() { + final ExchangeItemElement eie_ok = InformationFactory.eINSTANCE.createExchangeItemElement(); + eie_ok.setDescription("My Description"); + + ok(eie_ok); + } + + public void Rule_DS_1_3_TestCase_KO() { + final ExchangeItemElement eie_ko_1 = InformationFactory.eINSTANCE.createExchangeItemElement(); + eie_ko_1.setDescription(null); + ko(eie_ko_1); + + final ExchangeItemElement eie_ko_2 = InformationFactory.eINSTANCE.createExchangeItemElement(); + eie_ko_2.setDescription(""); + ko(eie_ko_2); + } + + @Override + public void test() throws Exception { + Rule_DS_1_3_TestCase_OK(); + Rule_DS_1_3_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_4_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_4_TestCase.java new file mode 100755 index 0000000000..a02a3ad795 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_4_TestCase.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.information.ExchangeItem; +import org.polarsys.capella.core.data.information.InformationFactory; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that Exchange Items have a description + */ +public class Rule_DS_1_4_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.information.validation.DS_1-4" }); + } + + public void Rule_DS_1_4_TestCase_OK() { + final ExchangeItem ei_ok = InformationFactory.eINSTANCE.createExchangeItem(); + ei_ok.setDescription("My Description"); + + ok(ei_ok); + } + + public void Rule_DS_1_4_TestCase_KO() { + final ExchangeItem ei_ko_1 = InformationFactory.eINSTANCE.createExchangeItem(); + ei_ko_1.setDescription(null); + ko(ei_ko_1); + + final ExchangeItem ei_ko_2 = InformationFactory.eINSTANCE.createExchangeItem(); + ei_ko_2.setDescription(""); + ko(ei_ko_2); + } + + @Override + public void test() throws Exception { + Rule_DS_1_4_TestCase_OK(); + Rule_DS_1_4_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_5_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_5_TestCase.java new file mode 100755 index 0000000000..f0dc873f1c --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_5_TestCase.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.cs.CsFactory; +import org.polarsys.capella.core.data.cs.Interface; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that Interfaces have a description + */ +public class Rule_DS_1_5_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.cs.validation.DS_1-5" }); + } + + public void Rule_DS_1_5_TestCase_OK() { + final Interface intf_ok = CsFactory.eINSTANCE.createInterface(); + intf_ok.setDescription("My Description"); + + ok(intf_ok); + } + + public void Rule_DS_1_5_TestCase_KO() { + final Interface intf_ko_1 = CsFactory.eINSTANCE.createInterface(); + intf_ko_1.setDescription(null); + ko(intf_ko_1); + + final Interface intf_ko_2 = CsFactory.eINSTANCE.createInterface(); + intf_ko_2.setDescription(""); + ko(intf_ko_2); + } + + @Override + public void test() throws Exception { + Rule_DS_1_5_TestCase_OK(); + Rule_DS_1_5_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_6_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_6_TestCase.java new file mode 100755 index 0000000000..37def60c40 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_6_TestCase.java @@ -0,0 +1,62 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.information.InformationFactory; +import org.polarsys.capella.core.data.information.Property; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that Properties have a description + */ +public class Rule_DS_1_6_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.information.validation.DS_1-6" }); + } + + public void Rule_DS_1_6_TestCase_OK() { + final Property property_ok = InformationFactory.eINSTANCE.createProperty(); + property_ok.setDescription("My Description"); + + final org.polarsys.capella.core.data.information.Class parentClass = InformationFactory.eINSTANCE.createClass(); + parentClass.getOwnedFeatures().add(property_ok); + + ok(property_ok); + } + + public void Rule_DS_1_6_TestCase_KO() { + final org.polarsys.capella.core.data.information.Class parentClass = InformationFactory.eINSTANCE.createClass(); + + final Property property_ko_1 = InformationFactory.eINSTANCE.createProperty(); + property_ko_1.setDescription(null); + parentClass.getOwnedFeatures().add(property_ko_1); + ko(property_ko_1); + + final Property property_ko_2 = InformationFactory.eINSTANCE.createProperty(); + property_ko_2.setDescription(""); + parentClass.getOwnedFeatures().add(property_ko_2); + ko(property_ko_2); + } + + @Override + public void test() throws Exception { + Rule_DS_1_6_TestCase_OK(); + Rule_DS_1_6_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_7_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_7_TestCase.java new file mode 100755 index 0000000000..547329265a --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_7_TestCase.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.fa.FaFactory; +import org.polarsys.capella.core.data.fa.FunctionalChain; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * FunctionalChains should have a description. + */ +public class Rule_DS_1_7_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.fa.validation.DS_1-7" }); + } + + public void Rule_DS_1_7_TestCase_OK() { + final FunctionalChain fc_ok = FaFactory.eINSTANCE.createFunctionalChain(); + fc_ok.setDescription("My Description"); + + ok(fc_ok); + } + + public void Rule_DS_1_7_TestCase_KO() { + final FunctionalChain fc_ko_1 = FaFactory.eINSTANCE.createFunctionalChain(); + fc_ko_1.setDescription(null); + ko(fc_ko_1); + + final FunctionalChain fc_ko_2 = FaFactory.eINSTANCE.createFunctionalChain(); + fc_ko_2.setDescription(""); + ko(fc_ko_2); + } + + @Override + public void test() throws Exception { + Rule_DS_1_7_TestCase_OK(); + Rule_DS_1_7_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_8_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_8_TestCase.java new file mode 100755 index 0000000000..3dfc594620 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_8_TestCase.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.ctx.CtxFactory; +import org.polarsys.capella.core.data.ctx.SystemFunction; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * SystemFunctions should have a description + */ +public class Rule_DS_1_8_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.ctx.validation.DS_1-8" }); + } + + public void Rule_DS_1_8_TestCase_OK() { + final SystemFunction sf_ok = CtxFactory.eINSTANCE.createSystemFunction(); + sf_ok.setDescription("My Description"); + + ok(sf_ok); + } + + public void Rule_DS_1_8_TestCase_KO() { + final SystemFunction sf_ko_1 = CtxFactory.eINSTANCE.createSystemFunction(); + sf_ko_1.setDescription(null); + ko(sf_ko_1); + + final SystemFunction sf_ko_2 = CtxFactory.eINSTANCE.createSystemFunction(); + sf_ko_2.setDescription(""); + ko(sf_ko_2); + } + + @Override + public void test() throws Exception { + Rule_DS_1_8_TestCase_OK(); + Rule_DS_1_8_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_9_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_9_TestCase.java new file mode 100755 index 0000000000..3ba47b4578 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_1_9_TestCase.java @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.ctx.CtxFactory; +import org.polarsys.capella.core.data.ctx.SystemAnalysis; +import org.polarsys.capella.core.data.ctx.SystemFunction; +import org.polarsys.capella.core.data.ctx.SystemFunctionPkg; +import org.polarsys.capella.core.data.fa.FaFactory; +import org.polarsys.capella.core.data.fa.FunctionalExchange; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * FunctionalExchanges should have a description + */ +public class Rule_DS_1_9_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.fa.validation.DS_1-9" }); + } + + public void Rule_DS_1_9_TestCase_OK() { + final FunctionalExchange fe_ok = FaFactory.eINSTANCE.createFunctionalExchange(); + fe_ok.setDescription("My Description"); + + final SystemFunction sf = CtxFactory.eINSTANCE.createSystemFunction(); + sf.getOwnedFunctionalExchanges().add(fe_ok); + + final SystemFunctionPkg fpkg = CtxFactory.eINSTANCE.createSystemFunctionPkg(); + fpkg.getOwnedSystemFunctions().add(sf); + + final SystemAnalysis sa = CtxFactory.eINSTANCE.createSystemAnalysis(); + sa.setOwnedFunctionPkg(fpkg); + + ok(fe_ok); + } + + public void Rule_DS_1_9_TestCase_KO() { + final FunctionalExchange fe_ko_1 = FaFactory.eINSTANCE.createFunctionalExchange(); + fe_ko_1.setDescription(null); + + final FunctionalExchange fe_ko_2 = FaFactory.eINSTANCE.createFunctionalExchange(); + fe_ko_2.setDescription(""); + + final SystemFunction sf = CtxFactory.eINSTANCE.createSystemFunction(); + sf.getOwnedFunctionalExchanges().add(fe_ko_1); + sf.getOwnedFunctionalExchanges().add(fe_ko_2); + + final SystemFunctionPkg fpkg = CtxFactory.eINSTANCE.createSystemFunctionPkg(); + fpkg.getOwnedSystemFunctions().add(sf); + + final SystemAnalysis sa = CtxFactory.eINSTANCE.createSystemAnalysis(); + sa.setOwnedFunctionPkg(fpkg); + + ko(fe_ko_1); + ko(fe_ko_2); + } + + @Override + public void test() throws Exception { + Rule_DS_1_9_TestCase_OK(); + Rule_DS_1_9_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_2_1_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_2_1_TestCase.java new file mode 100755 index 0000000000..b0075baa4c --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_2_1_TestCase.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.ctx.CtxFactory; +import org.polarsys.capella.core.data.ctx.SystemComponent; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that Components have a summary + */ +public class Rule_DS_2_1_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.cs.validation.DS_2-1" }); + } + + public void Rule_DS_2_1_TestCase_OK() { + final SystemComponent comp = CtxFactory.eINSTANCE.createSystemComponent(); + comp.setSummary("My Summary"); + + ok(comp); + } + + public void Rule_DS_2_1_TestCase_KO() { + final SystemComponent comp_1 = CtxFactory.eINSTANCE.createSystemComponent(); + comp_1.setSummary(null); + ko(comp_1); + + final SystemComponent comp_2 = CtxFactory.eINSTANCE.createSystemComponent(); + comp_2.setSummary(""); + ko(comp_2); + } + + @Override + public void test() throws Exception { + Rule_DS_2_1_TestCase_OK(); + Rule_DS_2_1_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_2_2_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_2_2_TestCase.java new file mode 100755 index 0000000000..9dc2c493d6 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_2_2_TestCase.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.information.Class; +import org.polarsys.capella.core.data.information.InformationFactory; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that Data Types have a summary + */ +public class Rule_DS_2_2_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.information.validation.DS_2-2" }); + } + + public void Rule_DS_2_2_TestCase_OK() { + final Class class_ok = InformationFactory.eINSTANCE.createClass(); + class_ok.setSummary("My Summary"); + + ok(class_ok); + } + + public void Rule_DS_2_2_TestCase_KO() { + final Class class_ko_1 = InformationFactory.eINSTANCE.createClass(); + class_ko_1.setSummary(null); + ko(class_ko_1); + + final Class class_ko_2 = InformationFactory.eINSTANCE.createClass(); + class_ko_2.setSummary(""); + ko(class_ko_2); + } + + @Override + public void test() throws Exception { + Rule_DS_2_2_TestCase_OK(); + Rule_DS_2_2_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_2_3_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_2_3_TestCase.java new file mode 100755 index 0000000000..70ad4d9383 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_2_3_TestCase.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.information.ExchangeItem; +import org.polarsys.capella.core.data.information.InformationFactory; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that ExchangeItems have a summary + */ +public class Rule_DS_2_3_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.information.validation.DS_2-3" }); + } + + public void Rule_DS_2_3_TestCase_OK() { + final ExchangeItem ei_ok = InformationFactory.eINSTANCE.createExchangeItem(); + ei_ok.setSummary("My Summary"); + + ok(ei_ok); + } + + public void Rule_DS_2_3_TestCase_KO() { + final ExchangeItem ei_ko_1 = InformationFactory.eINSTANCE.createExchangeItem(); + ei_ko_1.setSummary(null); + ko(ei_ko_1); + + final ExchangeItem ei_ko_2 = InformationFactory.eINSTANCE.createExchangeItem(); + ei_ko_2.setSummary(""); + ko(ei_ko_2); + } + + @Override + public void test() throws Exception { + Rule_DS_2_3_TestCase_OK(); + Rule_DS_2_3_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_2_4_TestCase.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_2_4_TestCase.java new file mode 100755 index 0000000000..4d1718d9b8 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/Rule_DS_2_4_TestCase.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.Arrays; +import java.util.List; + +import org.polarsys.capella.core.data.cs.CsFactory; +import org.polarsys.capella.core.data.cs.Interface; +import org.polarsys.capella.test.validation.rules.ju.testcases.AbstractSimpleValidationTest; + +/** + * Ensure that Interfaces have a summary + */ +public class Rule_DS_2_4_TestCase extends AbstractSimpleValidationTest { + + @Override + protected List getRuleIDs() { + return Arrays.asList(new String[] { "org.polarsys.capella.core.data.cs.validation.DS_2-4" }); + } + + public void Rule_DS_2_4_TestCase_OK() { + final Interface intf_ok = CsFactory.eINSTANCE.createInterface(); + intf_ok.setSummary("My Summary"); + + ok(intf_ok); + } + + public void Rule_DS_2_4_TestCase_KO() { + final Interface intf_ko_1 = CsFactory.eINSTANCE.createInterface(); + intf_ko_1.setSummary(null); + ko(intf_ko_1); + + final Interface intf_ko_2 = CsFactory.eINSTANCE.createInterface(); + intf_ko_2.setSummary(""); + ko(intf_ko_2); + } + + @Override + public void test() throws Exception { + Rule_DS_2_4_TestCase_OK(); + Rule_DS_2_4_TestCase_KO(); + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/SummaryAndDescriptionTestSuite.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/SummaryAndDescriptionTestSuite.java new file mode 100755 index 0000000000..f4ad430e74 --- /dev/null +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testcases/summaryAndDescription/SummaryAndDescriptionTestSuite.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright (c) 2024, 2024 THALES GLOBAL SERVICES. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Thales - initial API and implementation + *******************************************************************************/ +package org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription; + +import java.util.ArrayList; +import java.util.List; + +import org.polarsys.capella.test.framework.api.BasicTestArtefact; +import org.polarsys.capella.test.framework.api.BasicTestSuite; + +import junit.framework.Test; + +public class SummaryAndDescriptionTestSuite extends BasicTestSuite { + + /** + * Returns the suite. This is required to unary launch this test. + */ + public static Test suite() { + return new SummaryAndDescriptionTestSuite(); + } + + /** + * @see org.polarsys.capella.test.framework.api.BasicTestSuite#getTests() + */ + protected List getTests() { + List tests = new ArrayList(); + tests.add(new Rule_DS_1_1_TestCase()); + tests.add(new Rule_DS_1_2_TestCase()); + tests.add(new Rule_DS_1_3_TestCase()); + tests.add(new Rule_DS_1_4_TestCase()); + tests.add(new Rule_DS_1_5_TestCase()); + tests.add(new Rule_DS_1_6_TestCase()); + tests.add(new Rule_DS_1_7_TestCase()); + tests.add(new Rule_DS_1_8_TestCase()); + tests.add(new Rule_DS_1_9_TestCase()); + tests.add(new Rule_DS_1_10_TestCase()); + tests.add(new Rule_DS_1_11_TestCase()); + + tests.add(new Rule_DS_2_1_TestCase()); + tests.add(new Rule_DS_2_2_TestCase()); + tests.add(new Rule_DS_2_3_TestCase()); + tests.add(new Rule_DS_2_4_TestCase()); + + return tests; + } + +} diff --git a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testsuites/main/ValidationRulesTestSuite.java b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testsuites/main/ValidationRulesTestSuite.java index 540c0e7b09..2da12faf5b 100644 --- a/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testsuites/main/ValidationRulesTestSuite.java +++ b/tests/plugins/org.polarsys.capella.test.validation.rules.ju/src/org/polarsys/capella/test/validation/rules/ju/testsuites/main/ValidationRulesTestSuite.java @@ -18,8 +18,10 @@ import org.polarsys.capella.test.framework.api.BasicTestArtefact; import org.polarsys.capella.test.framework.api.BasicTestSuite; import org.polarsys.capella.test.validation.rules.ju.testcases.dc_cl.DCCLRulesTestSuite; +import org.polarsys.capella.test.validation.rules.ju.testcases.functional.FunctionalTestSuite; import org.polarsys.capella.test.validation.rules.ju.testcases.naming.NameConflictTestSuite; import org.polarsys.capella.test.validation.rules.ju.testcases.namingConventions.NamingConventionsTestSuite; +import org.polarsys.capella.test.validation.rules.ju.testcases.summaryAndDescription.SummaryAndDescriptionTestSuite; import org.polarsys.capella.test.validation.rules.ju.testsuites.partial.MiscTestSuite; import org.polarsys.capella.test.validation.rules.ju.testsuites.partial.RulesOnDesignTestSuite; import org.polarsys.capella.test.validation.rules.ju.testsuites.partial.RulesOnIntegrityTestSuite; @@ -48,6 +50,8 @@ protected List getTests() { tests.add(new RulesOnQualityTestSuite()); tests.add(new RulesOnTransitionTestSuite()); tests.add(new NamingConventionsTestSuite()); + tests.add(new SummaryAndDescriptionTestSuite()); + tests.add(new FunctionalTestSuite()); return tests; }