[Sirius][ClassDiagram] Refactore the creation tests of the nodes for Papyrus Sirius ClassDiagram
| Bugzilla Link | 579567 |
| Status | ASSIGNED |
| Importance | P3 normal |
| Reported | Apr 04, 2022 08:25 EDT |
| Modified | Jul 06, 2022 10:25 EDT |
| Version | 0.7.0 |
| See also | Gerrit change 192514, Git commit 14246034, Git commit 46e8ad8c |
Description
Several Junit tests already exists for Sirius ClassDiagram but the code is often duplicated for each tests.
We propose to refactore these tests in order to create a usefull API to test the creation of the node.
We propose to delegate the validation of the created elements to two kind of classes:
- one to validate the graphical aspect of the created element (type of Sirius diagram element + mapping type + compartments, number of element inside the parent befaore/after the creation, Undo/Redo)
- one to validate the semantic aspect of the created element (instanceof xxx, number of elements inside the parent before/after the creation, Undo/Redo).
We think the validation of the graphical aspect of the element could be reuse later to check the graphical element after a DnD from the ModelExplorer.