Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.queries.feature/pom.xml (renamed from tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/pom.xml)6
-rw-r--r--releng/top-pom-main-tests.xml24
-rw-r--r--tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java2
-rw-r--r--tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/BasicEditorTest.java2
-rw-r--r--tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/DawnEditorAdapterTest.java4
-rw-r--r--tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/markers/tests/ModelValidationMarkersTest.java2
-rw-r--r--tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.search.ui.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/AttributeTest.java1
-rw-r--r--tests/junit/extraplugins/moka/org.eclipse.papyrus.moka.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/extraplugins/moka/org.eclipse.papyrus.moka.tests/src/org/eclipse/papyrus/moka/tests/semantics/AbstractMokaTest.java1
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/AbstractEditorIntegrationTest.java1
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingMemoryLeakFixture.java2
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingScenariosMemoryLeakTest.java5
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorMemoryLeakTest.java9
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorReloadTest.java11
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/ModelSetTests.java2
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/PageManagerTests.java8
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/resource/AbstractModelWithSharedResourceTest.java1
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/resource/ModelSetTest.java8
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/AbstractElementTypeTests.java62
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF11
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus ALL tests - Failures.launch2
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java12
-rw-r--r--tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/src/org/eclipse/papyrus/customization/properties/tests/qvt/TransformationsTests.java7
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomainTest.java1
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManagerTest.java2
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyTesterTest.java2
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/PapyrusModelSetFixture.java1
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/PapyrusROEditingDomainFixture.java1
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/advice/ReadOnlyObjectEditAdviceTest.java11
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AbstractCSSStylesheetTest.java1
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java1
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java1
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSProjectStylesheetsTest.java2
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java1
-rw-r--r--tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests/src/org/eclipse/papyrus/infra/nattable/model/editor/tests/tests/EditorsTests.java4
-rw-r--r--tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/src/org/eclipse/papyrus/infra/nattable/tests/tests/TableSelectionProviderTest.java1
-rwxr-xr-xtests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/META-INF/MANIFEST.MF3
-rwxr-xr-xtests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest.java2
-rwxr-xr-xtests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest2.java2
-rwxr-xr-xtests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableVerifyContents.java2
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/AbstractControlModeTest.java5
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/ControlModelTest.java3
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/ControlModelWithProfileTest.java3
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/AbstractUncontrolModelTest.java5
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/UncontrolModelTest.java3
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/UncontrolModelWithProfileTest.java3
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests/src/org/eclipse/papyrus/infra/services/edit/tests/edit/advice/MarkerDeletionAdviceTest.java3
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java1
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java1
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/AbstractTest.java1
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/AbstractTest.java1
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/AbstractTest4B.java3
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/META-INF/MANIFEST.MF8
-rwxr-xr-xtests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.tests/META-INF/MANIFEST.MF3
-rw-r--r--[-rwxr-xr-x]tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/OpenTableTest.java1
-rw-r--r--tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInSysMLModelTest.java10
-rw-r--r--tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInUMLModel.java5
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/common/AbstractModelExplorerTest.java5
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteInModelExplorer.java2
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocatedTest.java1
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ViewTest.java1
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPortTest.java1
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPropertyTest.java1
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementRelatedTest.java1
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementTest.java1
-rw-r--r--tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/TestCaseTest.java1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/.classpath8
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/.project28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/META-INF/MANIFEST.MF34
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/about.html28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/build.properties9
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/plugin.properties12
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/Activator.java65
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java34
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/IClassDiagramTestsConstants.java22
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AbstractPapyrusTestCase.java28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java45
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildLabel.java258
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildNode.java174
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramContainment.java53
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLink.java112
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLinkOwnedBySource.java93
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramNestedClassifier.java154
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramTopNode.java179
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestDropfunction.java151
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestMutliLink.java62
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java114
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load100ClassTest.java71
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load10ClassTest.java71
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load200ClassTest.java71
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load300ClassTest.java71
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load400ClassTest.java71
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load500ClassTest.java71
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/LoadTests.java38
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AbstractPapyrusTestCase.java1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/.classpath7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/.project28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/.settings/org.eclipse.jdt.core.prefs12
-rwxr-xr-xtests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF38
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/about.html28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/build.properties7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/plugin.properties12
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/Activator.java63
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java403
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestMultiLink.java434
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestNode.java571
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildLabel.java440
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildNode.java127
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestCommentLink.java248
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestConstraintLink.java248
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContainmentLink.java265
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLink.java531
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkOwnedBySource.java320
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkWithParent.java387
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestNested.java184
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestTopNode.java47
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/src/org/eclipse/papyrus/uml/diagram/activity/tests/canonical/TestActivityGroup.java2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.classpath1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/META-INF/MANIFEST.MF8
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/build.properties4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.di (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/ClassDiagramTest.di)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.notation (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/ClassDiagramTest.notation)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.uml (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/ClassDiagramTest.uml)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/legacyPackage/package24.di (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/legacyPackage/package24.di)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/legacyPackage/package24.notation (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/legacyPackage/package24.notation)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/legacyPackage/package24.uml (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/legacyPackage/package24.uml)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.diagram.clazz.test.launch (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/org.eclipse.papyrus.diagram.clazz.test.launch)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.uml.diagram.clazz.test.launch41
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/plugin.properties2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/AllCanonicalTestsGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/AllCanonicalTestsGen.java)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInClassEditPartGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInClassEditPartGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInCommentEditPartGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInCommentEditPartGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInComponentEditPartGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInComponentEditPartGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInConstraintEditPartGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInConstraintEditPartGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInDataTypeEditPartGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInDataTypeEditPartGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInEnumerationEditPartGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInEnumerationEditPartGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInformationItemEditPartGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInformationItemEditPartGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInstanceSpecificationEditPartGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInstanceSpecificationEditPartGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInModelEditPartTNGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInModelEditPartTNGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPackageEditPartGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPackageEditPartGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPrimitiveTypeEditPartGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPrimitiveTypeEditPartGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInSignalEditPartGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInSignalEditPartGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkOwnedBySourceGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkOwnedBySourceGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramTopNodeGen.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramTopNodeGen.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/Activator.java10
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestAppearanceClassDiagramTopNode.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestAppearanceClassDiagramTopNode.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildLabel.java31
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildNode.java44
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramContainment.java6
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLink.java15
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLinkOwnedBySource.java6
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramTopNode.java32
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestDropfunction.java6
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestEditableClassDiagramTopNode.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestEditableClassDiagramTopNode.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java6
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/legacy/PackageDiagramLegacyTest.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/legacy/PackageDiagramLegacyTest.java)1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/css/Bug431694_UndoDeleteTest.java8
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/CommonBendpointsTest.java1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/build.properties3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/src/org/eclipse/papyrus/uml/diagram/dnd/tests/tests/InstanceSpecificationTest.java1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/AllTests.java1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/PopupUtil.java1
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/pro20130916/Fixbug_LifelineManagement_417365.java2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/build.properties5
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/META-INF/MANIFEST.MF19
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/plugin.properties2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceElementTest.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceElementTest.java)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeLabelTest.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeLabelTest.java)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeTest.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/appearance/AppearanceNodeTest.java)7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java143
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestMultiLink.java36
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestNode.java262
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildLabel.java140
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildNode.java42
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestCommentLink.java10
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestConstraintLink.java10
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContainmentLink.java24
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLink.java126
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkOwnedBySource.java11
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkWithParent.java5
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestNested.java16
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateLinkFromPaletteTest.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateLinkFromPaletteTest.java)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateLinkOwnedBySourceFromPaletteTest.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateLinkOwnedBySourceFromPaletteTest.java)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateNodeFromPaletteTest.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/createFromPalette/CreateNodeFromPaletteTest.java)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/EditableElementTest.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/EditableElementTest.java)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/EditableNodeTest.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/edition/EditableNodeTest.java)3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests/src/org/eclipse/papyrus/uml/diagram/timing/tests/generic/AbstractPapyrusTestCase.java3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestCreateModelFromExistingModelWizard.java2
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/AdvancedModeTest.java2
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/DeleteModelExplorerTest.java2
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/CopyPasteModelExplorerTest.java2
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/CutPasteModelExplorerTest.java2
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/DiagramCopyPasteModelExplorerTest.java3
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/TableCopyPasteModelExplorerTest.java3
-rwxr-xr-xtests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.tests/src/org/eclipse/papyrus/uml/nattable/tests/tests/UMLRestrictedContentProviderTest.java1
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.modelrepair.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.modelrepair.tests/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/StereotypeApplicationRepairSnippetTest.java3
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.modelrepair.tests/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/StereotypeRepairRegressionTest.java3
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/build.properties3
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/src/org/eclipse/papyrus/uml/service/types/tests/creation/CreateElementTest.java2
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/src/org/eclipse/papyrus/uml/service/types/tests/creation/CreatePureUMLElementTest.java4
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/src/org/eclipse/papyrus/uml/service/types/tests/deletion/DeletePureUMLElementTest.java1
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/ContentProviderTest.java1
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/DependencyManagementTest.java36
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/NamedElementValidatorTest.java3
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/UMLStereotypePropertyContentProviderTest.java1
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils.tests/src/org/eclipse/papyrus/uml/tools/utils/tests/tests/NameResolutionHelperTest.java1
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils.tests/src/org/eclipse/papyrus/uml/tools/utils/tests/tests/NamedElementUtilTest.java1
-rw-r--r--tests/junit/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.tests/src/org/eclipse/papyrus/views/modelexplorer/tests/OpendiagramTest.java1
257 files changed, 1134 insertions, 7031 deletions
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/pom.xml b/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.queries.feature/pom.xml
index ff1299caf5f..41e532f8061 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests/pom.xml
+++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.queries.feature/pom.xml
@@ -6,10 +6,10 @@
<groupId>org.eclipse.papyrus</groupId>
<artifactId>org.eclipse.papyrus</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/top-pom-main-tests.xml</relativePath>
+ <relativePath>../../../releng/top-pom-main-tests.xml</relativePath>
</parent>
<groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus.paletteconfiguration.tests</artifactId>
+ <artifactId>org.eclipse.papyrus.tests.infra.queries.feature</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
+ <packaging>eclipse-feature</packaging>
</project>
diff --git a/releng/top-pom-main-tests.xml b/releng/top-pom-main-tests.xml
index a5f18d02d9b..5da834aa6f4 100644
--- a/releng/top-pom-main-tests.xml
+++ b/releng/top-pom-main-tests.xml
@@ -29,7 +29,6 @@
<module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests</module>
<module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests</module>
<module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests</module>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.paletteconfiguration.tests</module>
<module>../tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests</module>
<module>../tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests</module>
<module>../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests</module>
@@ -116,11 +115,6 @@
<url>http://download.eclipse.org/modeling/emf/emf/updates/milestones/</url>
</repository>
<repository>
- <id>emft-emffacet</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/facet/updates/integration/0.4.0/I201402271523/</url>
- </repository>
- <repository>
<id>emft-mwe</id>
<layout>p2</layout>
<url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201403111231/mwe</url>
@@ -138,7 +132,7 @@
<repository>
<id>ep</id>
<layout>p2</layout>
- <url>http://download.eclipse.org/eclipse/updates/4.4milestones/S-4.4M6-201403061200/</url>
+ <url>http://download.eclipse.org/eclipse/updates/4.4milestones/S-4.4RC4-201406061215/</url>
</repository>
<repository>
<id>gef</id>
@@ -158,7 +152,7 @@
<repository>
<id>gmf-tooling</id>
<layout>p2</layout>
- <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.2.M6a</url>
+ <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.2.RC3</url>
</repository>
<repository>
<id>m2m-atl</id>
@@ -178,32 +172,32 @@
<repository>
<id>mdt-ocl</id>
<layout>p2</layout>
- <url>http://download.eclipse.org/modeling/mdt/ocl/updates/milestones/5.0.0/S201403101212</url>
+ <url>http://download.eclipse.org/modeling/mdt/ocl/updates/milestones/5.0.0/S201406091420</url>
</repository>
<repository>
<id>mdt-uml2</id>
<layout>p2</layout>
- <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.0-I-builds</url>
+ <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.0milestones</url>
</repository>
<repository>
<id>mmt-qvto</id>
<layout>p2</layout>
- <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.4.0/S201403110437</url>
+ <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.4.0/S201406101621</url>
</repository>
<repository>
<id>mylyn</id>
<layout>p2</layout>
- <url>http://download.eclipse.org/mylyn/snapshots/3.11</url>
+ <url>http://download.eclipse.org/mylyn/snapshots/3.12</url>
</repository>
<repository>
<id>nattable</id>
<layout>p2</layout>
- <url>http://download.eclipse.org/nattable/releases/1.0.1/repository/</url>
+ <url>http://download.eclipse.org/nattable/releases/1.1.0/repository/</url>
</repository>
<repository>
<id>orbit</id>
<layout>p2</layout>
- <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20130517111416/repository</url>
+ <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository</url>
</repository>
<repository>
<id>subversive</id>
@@ -213,7 +207,7 @@
<repository>
<id>tmf-xtext</id>
<layout>p2</layout>
- <url>http://download.eclipse.org/modeling/tmf/xtext/updates/milestones/head/S201403111428/</url>
+ <url>http://download.eclipse.org/modeling/tmf/xtext/updates/releases/head/R201405210727/</url>
</repository>
<repository>
<id>webtools</id>
diff --git a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/META-INF/MANIFEST.MF b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/META-INF/MANIFEST.MF
index de4c08393e8..ae19a78baea 100644
--- a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/META-INF/MANIFEST.MF
@@ -11,7 +11,8 @@ Require-Bundle: org.eclipse.papyrus.cdo.core;bundle-version="1.0.0";visibility:=
org.eclipse.papyrus.infra.services.controlmode;bundle-version="1.0.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
org.eclipse.papyrus.infra.services.resourceloading.preferences;bundle-version="1.0.0",
- org.eclipse.papyrus.junit.utils;bundle-version="1.0.0";visibility:=reexport
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0";visibility:=reexport,
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.cdo.core.resource.tests,
org.eclipse.papyrus.cdo.core.tests,
org.eclipse.papyrus.cdo.core.util.tests,
diff --git a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java
index 3042a72f5a6..c831f6e9efd 100644
--- a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java
+++ b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests/src/org/eclipse/papyrus/cdo/core/tests/AbstractPapyrusCDOTest.java
@@ -51,8 +51,8 @@ import org.eclipse.papyrus.cdo.core.IPapyrusRepository;
import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
import org.eclipse.papyrus.cdo.internal.core.IInternalPapyrusRepository;
import org.eclipse.papyrus.cdo.internal.core.PapyrusRepositoryManager;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
-import org.eclipse.papyrus.junit.utils.tests.AbstractPapyrusTest;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
diff --git a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/META-INF/MANIFEST.MF b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/META-INF/MANIFEST.MF
index 9d2840d25db..439b765da2c 100644
--- a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/META-INF/MANIFEST.MF
@@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.cdo.validation.problems;bundle-version="1.0.0",
org.eclipse.papyrus.cdo.validation.problems.edit;bundle-version="1.0.0",
org.eclipse.emf.cdo.server.ocl;bundle-version="4.2.0",
- org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.cdo.internal.ui.editors.tests;x-internal:=true,
org.eclipse.papyrus.cdo.internal.ui.markers.tests;x-internal:=true,
org.eclipse.papyrus.cdo.ui.tests
diff --git a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/BasicEditorTest.java b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/BasicEditorTest.java
index 510b7b74452..2ca0ed87f13 100644
--- a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/BasicEditorTest.java
+++ b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/BasicEditorTest.java
@@ -32,7 +32,7 @@ import org.eclipse.papyrus.infra.core.sasheditor.editor.IEditorPage;
import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageVisitor;
import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
import org.eclipse.papyrus.infra.core.utils.AdapterUtils;
-import org.eclipse.papyrus.junit.utils.rules.MemoryLeakRule;
+import org.eclipse.papyrus.junit.framework.classification.rules.MemoryLeakRule;
import org.eclipse.uml2.uml.Class;
import org.junit.Rule;
import org.junit.Test;
diff --git a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/DawnEditorAdapterTest.java b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/DawnEditorAdapterTest.java
index be6018ddd34..58601e61b93 100644
--- a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/DawnEditorAdapterTest.java
+++ b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/editors/tests/DawnEditorAdapterTest.java
@@ -31,8 +31,8 @@ import org.eclipse.net4j.util.event.IListener;
import org.eclipse.papyrus.cdo.internal.ui.editors.DawnEditorAdapter;
import org.eclipse.papyrus.cdo.internal.ui.editors.PapyrusGMFEditorSupport;
import org.eclipse.papyrus.cdo.ui.tests.AbstractPapyrusCDOUITest;
-import org.eclipse.papyrus.junit.utils.rules.Condition;
-import org.eclipse.papyrus.junit.utils.rules.Conditional;
+import org.eclipse.papyrus.junit.framework.classification.rules.Condition;
+import org.eclipse.papyrus.junit.framework.classification.rules.Conditional;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
diff --git a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/markers/tests/ModelValidationMarkersTest.java b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/markers/tests/ModelValidationMarkersTest.java
index 4db81a453fa..5fdb6357fa1 100644
--- a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/markers/tests/ModelValidationMarkersTest.java
+++ b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/internal/ui/markers/tests/ModelValidationMarkersTest.java
@@ -34,7 +34,7 @@ import org.eclipse.papyrus.infra.services.markerlistener.MarkersMonitorService;
import org.eclipse.papyrus.infra.services.validation.EcoreDiagnostician;
import org.eclipse.papyrus.infra.services.validation.commands.ValidateDelMarkersFromModelCommand;
import org.eclipse.papyrus.infra.services.validation.commands.ValidateModelCommand;
-import org.eclipse.papyrus.junit.utils.rules.MemoryLeakRule;
+import org.eclipse.papyrus.junit.framework.classification.rules.MemoryLeakRule;
import org.eclipse.ui.PartInitException;
import org.junit.After;
import org.junit.Before;
diff --git a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.search.ui.tests/META-INF/MANIFEST.MF b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.search.ui.tests/META-INF/MANIFEST.MF
index 697b61acd2f..b0130331d1d 100644
--- a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.search.ui.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.search.ui.tests/META-INF/MANIFEST.MF
@@ -6,7 +6,8 @@ Require-Bundle: org.eclipse.papyrus.cdo.core.tests;bundle-version="1.0.0",
org.eclipse.ui;bundle-version="3.105.0",
org.eclipse.papyrus.cdo.ui;bundle-version="1.0.0",
org.eclipse.search;bundle-version="3.9.0",
- org.eclipse.emf.cdo.server.ocl;bundle-version="4.2.0"
+ org.eclipse.emf.cdo.server.ocl;bundle-version="4.2.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.cdo.uml.search.ui.tests
Bundle-Vendor: %providerName
Bundle-Version: 1.0.0.qualifier
diff --git a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui.tests/META-INF/MANIFEST.MF b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui.tests/META-INF/MANIFEST.MF
index 5491a999b81..f9da9af05ec 100644
--- a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui.tests/META-INF/MANIFEST.MF
@@ -7,7 +7,8 @@ Require-Bundle: org.junit;bundle-version="4.10.0",
org.eclipse.ui;bundle-version="3.100.0",
org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
org.eclipse.papyrus.cdo.ui;bundle-version="1.0.0",
- org.eclipse.emf.cdo.server.ocl;bundle-version="4.2.0"
+ org.eclipse.emf.cdo.server.ocl;bundle-version="4.2.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.cdo.uml.internal.ui.importsources.tests;x-internal:=true,
org.eclipse.papyrus.cdo.uml.ui.tests
Bundle-Vendor: %providerName
diff --git a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.tests/META-INF/MANIFEST.MF b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.tests/META-INF/MANIFEST.MF
index 805952b04fc..f85e5b6078f 100644
--- a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.tests/META-INF/MANIFEST.MF
@@ -8,7 +8,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.8.0,4.0.0)",
org.eclipse.emf.ecore.xmi;bundle-version="[2.8.0,3.0.0)";visibility:=reexport,
org.junit;visibility:=reexport,
org.eclipse.emf.ecore.edit;bundle-version="[2.8.0,3.0.0)",
- org.eclipse.papyrus.cdo.core.tests;bundle-version="1.0.0"
+ org.eclipse.papyrus.cdo.core.tests;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/AttributeTest.java b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/AttributeTest.java
index a5a12ca7298..41581f89cad 100644
--- a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/AttributeTest.java
+++ b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.tests/src/org/eclipse/papyrus/cdo/validation/problems/tests/AttributeTest.java
@@ -14,7 +14,6 @@ package org.eclipse.papyrus.cdo.validation.problems.tests;
import java.util.Map;
import junit.framework.TestCase;
-
import junit.textui.TestRunner;
import org.eclipse.papyrus.cdo.validation.problems.ProblemsFactory;
diff --git a/tests/junit/extraplugins/moka/org.eclipse.papyrus.moka.tests/META-INF/MANIFEST.MF b/tests/junit/extraplugins/moka/org.eclipse.papyrus.moka.tests/META-INF/MANIFEST.MF
index 22e09b5f3f4..df4351395bd 100644
--- a/tests/junit/extraplugins/moka/org.eclipse.papyrus.moka.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/extraplugins/moka/org.eclipse.papyrus.moka.tests/META-INF/MANIFEST.MF
@@ -22,7 +22,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.moka.fuml;bundle-version="1.0.0",
org.eclipse.papyrus.moka.fuml.assertionlibrary;bundle-version="1.0.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
- org.eclipse.papyrus.moka.composites.utils;bundle-version="1.0.0"
+ org.eclipse.papyrus.moka.composites.utils;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.papyrus.moka.tests
diff --git a/tests/junit/extraplugins/moka/org.eclipse.papyrus.moka.tests/src/org/eclipse/papyrus/moka/tests/semantics/AbstractMokaTest.java b/tests/junit/extraplugins/moka/org.eclipse.papyrus.moka.tests/src/org/eclipse/papyrus/moka/tests/semantics/AbstractMokaTest.java
index 888059a1efd..0b950484013 100644
--- a/tests/junit/extraplugins/moka/org.eclipse.papyrus.moka.tests/src/org/eclipse/papyrus/moka/tests/semantics/AbstractMokaTest.java
+++ b/tests/junit/extraplugins/moka/org.eclipse.papyrus.moka.tests/src/org/eclipse/papyrus/moka/tests/semantics/AbstractMokaTest.java
@@ -25,6 +25,7 @@ import org.eclipse.debug.core.Launch;
import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel;
import org.eclipse.papyrus.infra.core.resource.IModel;
import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
import org.eclipse.papyrus.moka.MokaConstants;
import org.eclipse.papyrus.moka.launch.MokaLaunchDelegate;
import org.eclipse.papyrus.moka.tests.AbstractMokaLaunchConfigurationDelegate;
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/META-INF/MANIFEST.MF
index a1648ea6823..9bdc676ec18 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/META-INF/MANIFEST.MF
@@ -30,7 +30,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.uml.nattable.menu;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.sequence;bundle-version="1.0.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.editor.integration.tests,
org.eclipse.papyrus.editor.integration.tests.tests
Bundle-Vendor: Eclipse Modeling Project
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/AbstractEditorIntegrationTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/AbstractEditorIntegrationTest.java
index bbd334d8df2..3dc26b39d77 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/AbstractEditorIntegrationTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/AbstractEditorIntegrationTest.java
@@ -12,6 +12,7 @@
package org.eclipse.papyrus.editor.integration.tests.tests;
import org.eclipse.papyrus.editor.integration.tests.Activator;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
import org.osgi.framework.Bundle;
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingMemoryLeakFixture.java b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingMemoryLeakFixture.java
index 38905d6baff..2fb52b1d45a 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingMemoryLeakFixture.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingMemoryLeakFixture.java
@@ -27,6 +27,8 @@ import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramEditDomain;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
import org.eclipse.papyrus.infra.core.utils.AdapterUtils;
+import org.eclipse.papyrus.junit.utils.Duck;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.part.ISetSelectionTarget;
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingScenariosMemoryLeakTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingScenariosMemoryLeakTest.java
index 92b54feabc6..2df2fe2a585 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingScenariosMemoryLeakTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditingScenariosMemoryLeakTest.java
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2014 CEA and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,7 +27,10 @@ import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.junit.framework.classification.rules.MemoryLeakRule;
+import org.eclipse.papyrus.junit.framework.classification.rules.MemoryLeakRule.SoftReferenceSensitive;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.nattable.menu.util.TableMenuUtils;
import org.eclipse.ui.IEditorPart;
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorMemoryLeakTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorMemoryLeakTest.java
index bd2f88fc95a..a5a478de583 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorMemoryLeakTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorMemoryLeakTest.java
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2014 CEA and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -22,7 +22,10 @@ import org.eclipse.emf.ecore.ETypedElement;
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
import org.eclipse.papyrus.infra.services.validation.commands.ValidateModelCommand;
import org.eclipse.papyrus.junit.framework.classification.rules.MemoryLeakRule;
+import org.eclipse.papyrus.junit.framework.classification.rules.MemoryLeakRule.SoftReferenceSensitive;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
import org.eclipse.papyrus.uml.service.validation.UMLDiagnostician;
import org.junit.Rule;
import org.junit.Test;
@@ -129,7 +132,7 @@ public class EditorMemoryLeakTest extends AbstractPapyrusTest {
}
editor.flushDisplayEvents();
-
+
memory.add(editor.getModel());
memory.add(editor.getModel().getAppliedProfile("j2ee"));
}
@@ -172,7 +175,7 @@ public class EditorMemoryLeakTest extends AbstractPapyrusTest {
}
editor.flushDisplayEvents();
-
+
memory.add(editor.getModel());
memory.add(editor.getModel().getAppliedProfile("j2ee"));
}
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorReloadTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorReloadTest.java
index 8a182fd8701..b857574e390 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorReloadTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/EditorReloadTest.java
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2014 CEA and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -12,6 +12,8 @@
*/
package org.eclipse.papyrus.editor.integration.tests.tests;
+import static org.eclipse.papyrus.junit.matchers.DiagramMatchers.collapsedIn;
+import static org.eclipse.papyrus.junit.matchers.DiagramMatchers.editPartSelected;
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
@@ -53,6 +55,11 @@ import org.eclipse.papyrus.infra.core.utils.AdapterUtils;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.junit.framework.classification.ExpensiveTest;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.Duck;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.junit.utils.rules.ShowView;
+import org.eclipse.papyrus.junit.utils.rules.ShowView.Location;
import org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView;
import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.TreeItem;
@@ -86,7 +93,7 @@ import com.google.common.collect.Sets;
/**
* Test cases checking that various different scenarios in Papyrus editor re-loading for changes in resource dependencies.
- *
+ *
* @see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=437217">bug 437217</a>
*/
@ExpensiveTest
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/ModelSetTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/ModelSetTests.java
index 417fbc8ccc2..4de36203f18 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/ModelSetTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/ModelSetTests.java
@@ -24,7 +24,7 @@ import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
-import org.eclipse.papyrus.infra.core.utils.EditorUtils;
+import org.eclipse.papyrus.junit.utils.EditorUtils;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
import org.eclipse.papyrus.uml.diagram.clazz.UmlClassDiagramForMultiEditor;
import org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand;
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/PageManagerTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/PageManagerTests.java
index 72e06825875..95881d857fb 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/PageManagerTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests/src/org/eclipse/papyrus/editor/integration/tests/tests/PageManagerTests.java
@@ -9,7 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 433371
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.editor.integration.tests.tests;
@@ -47,10 +47,10 @@ import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
-import org.eclipse.papyrus.infra.core.utils.EditorUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.junit.utils.EditorUtils;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
import org.eclipse.papyrus.uml.diagram.clazz.UmlClassDiagramForMultiEditor;
import org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand;
@@ -313,10 +313,10 @@ public class PageManagerTests extends AbstractEditorIntegrationTest {
initModel("bug433371", "delete_sash_page", getBundle());
ModelSet modelSet = getModelSet();
final Diagram diagram = (Diagram)NotationUtils.getNotationModel(modelSet).getResource().getContents().get(1);
-
+
IPageManager pageManager = editor.getServicesRegistry().getService(IPageManager.class);
pageManager.selectPage(diagram); // Make sure the one we want deleted is active
-
+
testPageDeletion(diagram.getElement(), diagram, UmlSequenceDiagramForMultiEditor.class);
}
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/META-INF/MANIFEST.MF
index 346a234b1c8..df32ede7fef 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/META-INF/MANIFEST.MF
@@ -1,6 +1,7 @@
Manifest-Version: 1.0
Require-Bundle: org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.infra.core.lifecycleevents,
org.eclipse.papyrus.infra.core.resource,
org.eclipse.papyrus.infra.core.services,
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/resource/AbstractModelWithSharedResourceTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/resource/AbstractModelWithSharedResourceTest.java
index 3a91590f4a5..2f05f8ac076 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/resource/AbstractModelWithSharedResourceTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/resource/AbstractModelWithSharedResourceTest.java
@@ -31,6 +31,7 @@ import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.papyrus.infra.core.resource.AbstractModelWithSharedResource.ModelKind;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/resource/ModelSetTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/resource/ModelSetTest.java
index ab2b78792e9..244f1cdf841 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/resource/ModelSetTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/resource/ModelSetTest.java
@@ -45,6 +45,10 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.papyrus.infra.core.resource.additional.AdditionalResourcesModel;
import org.eclipse.papyrus.infra.core.utils.TransactionHelper;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.ModelUtils;
+import org.eclipse.papyrus.junit.utils.resources.EcoreModel;
+import org.eclipse.papyrus.junit.utils.resources.WorkspaceModificationAssertion;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -317,9 +321,9 @@ public class ModelSetTest extends AbstractPapyrusTest {
thing.getEStructuralFeatures().add(reference);
}
});
-
+
// We need this referenced model to be writable in order to save it
- ModelUtils.makeReferencedModelsWritable(mngr, modelURI2 );
+ ModelUtils.makeReferencedModelsWritable(mngr, modelURI2);
mods.save(mngr);
assertThat("workspace resource not created", modelFile1.exists(), is(true));
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests/META-INF/MANIFEST.MF
index d2e02b93e94..da408855e9a 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests/META-INF/MANIFEST.MF
@@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0",
org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.8.0",
org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0"
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.infra.extendedtypes.tests
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/AbstractElementTypeTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/AbstractElementTypeTests.java
index 7daa72a3815..101a89e268a 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/AbstractElementTypeTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests/src/org/eclipse/papyrus/infra/extendedtypes/tests/AbstractElementTypeTests.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,8 +27,10 @@ import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.resource.ModelUtils;
import org.eclipse.papyrus.infra.core.resource.NotFoundException;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.utils.EditorUtils;
import org.eclipse.papyrus.infra.services.edit.internal.context.TypeContext;
+import org.eclipse.papyrus.junit.utils.EditorUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.papyrus.uml.tools.model.UmlUtils;
import org.eclipse.swt.widgets.Display;
@@ -46,9 +48,9 @@ import org.osgi.framework.Bundle;
/**
* Abstract class for element types tests
*/
-public abstract class AbstractElementTypeTests implements ITestConstants {
-
-
+public abstract class AbstractElementTypeTests implements ITestConstants {
+
+
@ClassRule
public static HouseKeeper.Static houseKeeper = new HouseKeeper.Static();
@@ -75,14 +77,14 @@ public abstract class AbstractElementTypeTests implements ITestConstants {
protected static IClientContext papyrusContext;
protected static Package otherPackageWithComponents;
-
+
protected static Component component1_packageWithComponents;
-
+
protected static Component component1_otherPackageWithComponents;
-
+
protected static Component component1_packageWithAllElements;
-
-
+
+
/**
* Init test class
*/
@@ -118,14 +120,14 @@ public abstract class AbstractElementTypeTests implements ITestConstants {
}
});
- transactionalEditingDomain = (TransactionalEditingDomain) openPapyrusEditor.getAdapter(TransactionalEditingDomain.class);
+ transactionalEditingDomain = (TransactionalEditingDomain)openPapyrusEditor.getAdapter(TransactionalEditingDomain.class);
assertTrue("Impossible to init editing domain", transactionalEditingDomain instanceof TransactionalEditingDomain);
// retrieve UML model from this editor
try {
modelset = ModelUtils.getModelSetChecked(openPapyrusEditor.getServicesRegistry());
umlIModel = UmlUtils.getUmlModel(modelset);
- rootModel = (Model) umlIModel.lookupRoot();
+ rootModel = (Model)umlIModel.lookupRoot();
Assert.assertNotNull("root model should not be null", rootModel);
@@ -141,7 +143,7 @@ public abstract class AbstractElementTypeTests implements ITestConstants {
} catch (Exception e) {
fail(e.getMessage());
}
-
+
try {
papyrusContext = TypeContext.getContext();
} catch (ServiceException e) {
@@ -155,27 +157,27 @@ public abstract class AbstractElementTypeTests implements ITestConstants {
*/
protected static void initExistingElements() throws Exception {
packageWithComponents = rootModel.getNestedPackage(PACKAGE_WITH_COMPONENTS);
- Assert.assertNotNull(PACKAGE_WITH_COMPONENTS+" should not be null", packageWithComponents);
- Assert.assertTrue(PACKAGE_WITH_COMPONENTS+" should be a Package", packageWithComponents instanceof Package);
+ Assert.assertNotNull(PACKAGE_WITH_COMPONENTS + " should not be null", packageWithComponents);
+ Assert.assertTrue(PACKAGE_WITH_COMPONENTS + " should be a Package", packageWithComponents instanceof Package);
packageWithAllElements = rootModel.getNestedPackage(PACKAGE_WITH_ALL_ELEMENTS);
- Assert.assertNotNull(PACKAGE_WITH_ALL_ELEMENTS+" should not be null", packageWithAllElements);
- Assert.assertTrue(PACKAGE_WITH_ALL_ELEMENTS+" should be a Package", packageWithAllElements instanceof Package);
-
+ Assert.assertNotNull(PACKAGE_WITH_ALL_ELEMENTS + " should not be null", packageWithAllElements);
+ Assert.assertTrue(PACKAGE_WITH_ALL_ELEMENTS + " should be a Package", packageWithAllElements instanceof Package);
+
otherPackageWithComponents = rootModel.getNestedPackage(OTHER_PACKAGE_WITH_COMPONENTS);
- Assert.assertNotNull(OTHER_PACKAGE_WITH_COMPONENTS+" should not be null", otherPackageWithComponents);
- Assert.assertTrue(OTHER_PACKAGE_WITH_COMPONENTS+" should be a Package", otherPackageWithComponents instanceof Package);
-
+ Assert.assertNotNull(OTHER_PACKAGE_WITH_COMPONENTS + " should not be null", otherPackageWithComponents);
+ Assert.assertTrue(OTHER_PACKAGE_WITH_COMPONENTS + " should be a Package", otherPackageWithComponents instanceof Package);
+
// init components
component1_packageWithComponents = (Component)packageWithComponents.getPackagedElement(COMPONENT_NAME);
- Assert.assertNotNull(COMPONENT_NAME+" should not be null", component1_packageWithComponents);
-
+ Assert.assertNotNull(COMPONENT_NAME + " should not be null", component1_packageWithComponents);
+
component1_otherPackageWithComponents = (Component)otherPackageWithComponents.getPackagedElement(COMPONENT_NAME);
- Assert.assertNotNull(COMPONENT_NAME+" should not be null", component1_otherPackageWithComponents);
-
- component1_packageWithAllElements= (Component)packageWithAllElements.getPackagedElement(COMPONENT_NAME);
- Assert.assertNotNull(COMPONENT_NAME+" should not be null", component1_packageWithAllElements);
-
+ Assert.assertNotNull(COMPONENT_NAME + " should not be null", component1_otherPackageWithComponents);
+
+ component1_packageWithAllElements = (Component)packageWithAllElements.getPackagedElement(COMPONENT_NAME);
+ Assert.assertNotNull(COMPONENT_NAME + " should not be null", component1_packageWithAllElements);
+
}
/**
@@ -191,6 +193,6 @@ public abstract class AbstractElementTypeTests implements ITestConstants {
@After
public void tearDown() throws Exception {
}
-
-
+
+
}
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
index 4081f75e9f2..0097d36f510 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
@@ -7,7 +7,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.uml.service.types;bundle-version="1.0.0",
org.eclipse.papyrus.sysml.service.types;bundle-version="1.0.0",
org.eclipse.papyrus.sysml.tests;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.diagram.clazz.tests;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.clazz.tests;bundle-version="1.0.0",
org.eclipse.papyrus.bundles.tests;bundle-version="1.0.0",
org.eclipse.papyrus.views.modelexplorer.tests;bundle-version="1.0.0",
org.eclipse.papyrus.uml.modelexplorer.tests;bundle-version="1.0.0",
@@ -18,8 +18,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.uml.diagram.statemachine.tests;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.communication.tests;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.dnd.tests;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.0.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
org.eclipse.papyrus.sysml.diagram.blockdefinition;bundle-version="1.0.0",
org.eclipse.papyrus.sysml.diagram.internalblock;bundle-version="1.0.0",
@@ -39,7 +39,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.uml.tools.utils.tests;bundle-version="1.0.0",
org.eclipse.papyrus.uml.nattable.tests;bundle-version="1.0.0",
org.eclipse.papyrus.sysml.nattable.requirement.tests;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.nattable.model.editor.tests;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.nattable.model.editor.tests;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.sequence.tests;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.interactionoverview.tests;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.composite.tests;bundle-version="1.0.0",
@@ -58,7 +58,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.junit.utils;bundle-version="1.0.0",
org.eclipse.papyrus.sysml.nattable.allocation.tests;bundle-version="1.0.0",
org.eclipse.papyrus.infra.nattable.views.tests;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.nattable.generic.tests;bundle-version="1.0.0"
+ org.eclipse.papyrus.uml.nattable.generic.tests;bundle-version="1.0.0",
+ org.eclipse.papyrus.sysml.modelexplorer.tests;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.0.0.qualifier
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus ALL tests - Failures.launch b/tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus ALL tests - Failures.launch
index c8626072583..0110a81aba1 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus ALL tests - Failures.launch
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/Papyrus ALL tests - Failures.launch
@@ -11,7 +11,7 @@
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Papyrus ALL tests - Failures"/>
<booleanAttribute key="default" value="true"/>
<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-all-workspace"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-failures-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java"/>
</listAttribute>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
index e9300c0f025..1f5b3740e49 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
@@ -60,7 +60,7 @@ public class AllTests {
suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID, "org.eclipse.papyrus.infra.core.tests.AllTests"));
suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.infra.core.sasheditor.Activator.PLUGIN_ID, "org.eclipse.papyrus.infra.core.sasheditor.tests.AllTests"));
suiteClasses.add(new FragmentTestSuiteClass("org.eclipse.papyrus.infra.core.sasheditor.di", "org.eclipse.papyrus.infra.core.sasheditor.di.tests.AllTests"));
- suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.infra.services.resourceloading.Activator.PLUGIN_ID, "org.eclipse.papyrus.infra.services.resourceloading.tests.AllTests"));
+ suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.infra.services.resourceloading.Activator.PLUGIN_ID, "org.eclipse.papyrus.infra.services.resourceloading.tests.AllTests"));
/* infra */
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.tools.tests.AllTests.class));
@@ -95,18 +95,18 @@ public class AllTests {
}
/* uml */
- suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.uml.diagram.common.Activator.ID, "org.eclipse.papyrus.uml.diagram.common.tests.AllTests"));
+ suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.uml.diagram.common.Activator.ID, "org.eclipse.papyrus.uml.diagram.common.tests.AllTests"));
suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.uml.service.types.Activator.PLUGIN_ID, "org.eclipse.papyrus.uml.service.types.tests.suites.AllTests"));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.modelexplorer.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.dnd.tests.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.tools.tests.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.tools.utils.tests.tests.AllTests.class));
- suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.stereotypeproperty.AllTests.class));
+ suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.stereotypeproperty.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.wizards.AllTests.class));
suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.uml.modelrepair.Activator.PLUGIN_ID, "org.eclipse.papyrus.uml.modelrepair.tests.AllTests"));
/* uml diagrams */
- suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.clazz.test.AllTests.class));
+ suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.clazz.test.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.activity.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.deployment.test.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.component.test.AllTests.class));
@@ -115,7 +115,7 @@ public class AllTests {
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.composite.test.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.statemachine.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.communication.tests.AllTests.class));
- suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.profile.tests.AllTests.class));
+ suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.profile.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.sequence.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.interactionoverview.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.common.tests.tests.AllTests.class));
@@ -124,8 +124,6 @@ public class AllTests {
//nattable tests
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.nattable.tests.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.nattable.generic.tests.tests.AllTests.class));
- suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.sysml.nattable.requirement.tests.tests.AllTests.class));
- suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.sysml.nattable.allocation.tests.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.nattable.views.tests.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.nattable.model.editor.tests.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.nattable.tests.tests.AllTests.class));
diff --git a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/META-INF/MANIFEST.MF
index d0427e01ca2..7e645a7edc7 100644
--- a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/META-INF/MANIFEST.MF
@@ -14,7 +14,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.uml2.uml;bundle-version="4.0.0",
org.junit;bundle-version="4.10.0",
org.eclipse.core.databinding;bundle-version="1.4.1",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.customization.properties.tests,
org.eclipse.papyrus.customization.properties.tests.qvt
Bundle-Vendor: Eclipse Modeling Project
diff --git a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/src/org/eclipse/papyrus/customization/properties/tests/qvt/TransformationsTests.java b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/src/org/eclipse/papyrus/customization/properties/tests/qvt/TransformationsTests.java
index 2b0ece0adb5..00a908e8d12 100644
--- a/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/src/org/eclipse/papyrus/customization/properties/tests/qvt/TransformationsTests.java
+++ b/tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests/src/org/eclipse/papyrus/customization/properties/tests/qvt/TransformationsTests.java
@@ -9,7 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 422257
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.tests.qvt;
@@ -36,6 +36,7 @@ import org.eclipse.papyrus.customization.properties.generation.generators.Profil
import org.eclipse.papyrus.customization.properties.model.xwt.resource.XWTResource;
import org.eclipse.papyrus.customization.properties.tests.Activator;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
import org.eclipse.papyrus.views.properties.contexts.Context;
import org.eclipse.papyrus.views.properties.root.PropertiesRoot;
import org.eclipse.papyrus.views.properties.runtime.ConfigurationManager;
@@ -62,7 +63,7 @@ public class TransformationsTests extends AbstractPapyrusTest {
private static IProject targetProject;
private IGenerator generator;
-
+
@BeforeClass
public static void init() throws CoreException {
targetProject = ProjectUtils.createProject(Activator.PLUGIN_ID + ".testProject");
@@ -81,7 +82,7 @@ public class TransformationsTests extends AbstractPapyrusTest {
generator = null;
}
}
-
+
@Test
public void handleXWTFileFromResource() {
//From an XWT Resource
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/META-INF/MANIFEST.MF
index 64c02d56e95..3a8ebdbf114 100644
--- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/META-INF/MANIFEST.MF
@@ -12,4 +12,5 @@ Require-Bundle: org.junit;bundle-version="4.10.0",
com.google.guava;bundle-version="11.0.0",
org.eclipse.papyrus.infra.services.controlmode;bundle-version="1.0.0",
org.eclipse.gmf.runtime.notation;bundle-version="1.7.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomainTest.java b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomainTest.java
index 4610d7b80dc..2dd2e42f390 100644
--- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomainTest.java
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomainTest.java
@@ -47,6 +47,7 @@ import org.eclipse.papyrus.infra.core.resource.RollbackStatus;
import org.eclipse.papyrus.infra.core.utils.TransactionHelper;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ProjectFixture;
import org.eclipse.uml2.common.util.UML2Util;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.Model;
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManagerTest.java b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManagerTest.java
index a80be516609..3ea1d340b3c 100644
--- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManagerTest.java
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyManagerTest.java
@@ -19,6 +19,8 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
import org.eclipse.papyrus.infra.emf.readonly.tests.PapyrusModelSetFixture;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.JavaResource;
+import org.eclipse.papyrus.junit.utils.rules.ProjectFixture;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyTesterTest.java b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyTesterTest.java
index 13f9ae9f518..50b101fe75e 100644
--- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyTesterTest.java
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/ReadOnlyTesterTest.java
@@ -17,6 +17,8 @@ import static org.junit.Assert.assertThat;
import org.eclipse.papyrus.infra.emf.readonly.tests.PapyrusROEditingDomainFixture;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.JavaResource;
+import org.eclipse.papyrus.junit.utils.rules.ProjectFixture;
import org.eclipse.uml2.uml.Type;
import org.junit.After;
import org.junit.Before;
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/PapyrusModelSetFixture.java b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/PapyrusModelSetFixture.java
index 3522ab4c222..f3c1ed1117b 100644
--- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/PapyrusModelSetFixture.java
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/PapyrusModelSetFixture.java
@@ -26,6 +26,7 @@ import org.eclipse.papyrus.infra.core.services.ServiceStartKind;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomain;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
+import org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture;
import org.junit.runner.Description;
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/PapyrusROEditingDomainFixture.java b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/PapyrusROEditingDomainFixture.java
index 6a1ac5748ab..3f1db0e0338 100644
--- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/PapyrusROEditingDomainFixture.java
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests/src/org/eclipse/papyrus/infra/emf/readonly/tests/PapyrusROEditingDomainFixture.java
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.infra.emf.readonly.tests;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomain;
import org.eclipse.papyrus.infra.emf.readonly.PapyrusROTransactionalEditingDomainProvider;
+import org.eclipse.papyrus.junit.utils.rules.AbstractModelFixture;
/**
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/META-INF/MANIFEST.MF
index d4e71d58d38..8578dd0f972 100644
--- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/META-INF/MANIFEST.MF
@@ -5,7 +5,8 @@ Export-Package: org.eclipse.papyrus.infra.emf.advice,
Require-Bundle: org.eclipse.emf.ecore.xmi;bundle-version="2.8.0",
org.junit;bundle-version="4.10.0",
org.eclipse.uml2.uml;bundle-version="5.0.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Fragment-Host: org.eclipse.papyrus.infra.emf;bundle-version="0.10.0"
Bundle-Version: 1.0.0.qualifier
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/advice/ReadOnlyObjectEditAdviceTest.java b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/advice/ReadOnlyObjectEditAdviceTest.java
index edb83f4c9e9..d44134d70d0 100644
--- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/advice/ReadOnlyObjectEditAdviceTest.java
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/advice/ReadOnlyObjectEditAdviceTest.java
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2014 CEA and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -73,6 +73,7 @@ import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.junit.framework.classification.rules.Condition;
import org.eclipse.papyrus.junit.framework.classification.rules.ConditionRule;
import org.eclipse.papyrus.junit.framework.classification.rules.Conditional;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Dependency;
@@ -156,7 +157,7 @@ public class ReadOnlyObjectEditAdviceTest {
@Test
public void testSetCommand_referenceOppositeAdd() {
UseCase doIt = classA.getUseCase("DoIt"); //$NON-NLS-1$
- ICommand command = getEditCommand(doIt, new SetRequest(doIt, UMLPackage.Literals.USE_CASE__SUBJECT, classB)); //$NON-NLS-1$
+ ICommand command = getEditCommand(doIt, new SetRequest(doIt, UMLPackage.Literals.USE_CASE__SUBJECT, classB));
assertExecutability(command);
}
@@ -177,7 +178,7 @@ public class ReadOnlyObjectEditAdviceTest {
}
});
- ICommand command = getEditCommand(doIt, new SetRequest(doIt, UMLPackage.Literals.USE_CASE__SUBJECT, ImmutableList.of(classA))); //$NON-NLS-1$
+ ICommand command = getEditCommand(doIt, new SetRequest(doIt, UMLPackage.Literals.USE_CASE__SUBJECT, ImmutableList.of(classA)));
assertExecutability(command);
}
@@ -240,7 +241,7 @@ public class ReadOnlyObjectEditAdviceTest {
}
});
- ICommand command = getEditCommand(writablePackage, new DestroyReferenceRequest(classB, UMLPackage.Literals.NAMED_ELEMENT__CLIENT_DEPENDENCY, usage[0], false)); //$NON-NLS-1$
+ ICommand command = getEditCommand(writablePackage, new DestroyReferenceRequest(classB, UMLPackage.Literals.NAMED_ELEMENT__CLIENT_DEPENDENCY, usage[0], false));
assertExecutability(command);
}
@@ -257,7 +258,7 @@ public class ReadOnlyObjectEditAdviceTest {
}
});
- ICommand command = getEditCommand(doIt, new DestroyReferenceRequest(doIt, UMLPackage.Literals.USE_CASE__SUBJECT, classB, false)); //$NON-NLS-1$
+ ICommand command = getEditCommand(doIt, new DestroyReferenceRequest(doIt, UMLPackage.Literals.USE_CASE__SUBJECT, classB, false));
assertExecutability(command);
}
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF
index 81a9d9f495c..bbeae2b4f59 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF
@@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.ui,
org.junit;bundle-version="4.10.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
org.eclipse.core.databinding;bundle-version="1.4.1",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.tests,
org.eclipse.papyrus.infra.gmfdiag.css.tests.tests
Bundle-Vendor: Eclipse Modeling Project
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AbstractCSSStylesheetTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AbstractCSSStylesheetTest.java
index 8a9c5f44650..ca677ae058b 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AbstractCSSStylesheetTest.java
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AbstractCSSStylesheetTest.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.uml2.uml.NamedElement;
import org.junit.After;
import org.junit.Assert;
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java
index 929c9c92fbf..ea48c427765 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSClassContentProvider;
import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java
index 654fb72940c..43c3c436003 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java
@@ -41,6 +41,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator;
import org.eclipse.papyrus.junit.framework.classification.NotImplemented;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.uml2.uml.NamedElement;
import org.junit.After;
import org.junit.Assert;
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSProjectStylesheetsTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSProjectStylesheetsTest.java
index c69dc0d325c..370765ed60d 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSProjectStylesheetsTest.java
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSProjectStylesheetsTest.java
@@ -35,6 +35,8 @@ import org.eclipse.papyrus.infra.gmfdiag.css.preferences.ThemePreferences;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsFactory;
import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator;
+import org.eclipse.papyrus.junit.utils.FilesUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java
index 91305f24f80..237c2a2511b 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java
@@ -28,6 +28,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
import org.eclipse.papyrus.infra.gmfdiag.css.notation.ForceValueHelper;
import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
diff --git a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests/META-INF/MANIFEST.MF
index 8fbbae1bc3e..14063a92ab0 100644
--- a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests/META-INF/MANIFEST.MF
@@ -5,7 +5,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.nattable.model.editor;bundle-version="1.0.0",
org.junit;bundle-version="4.11.0",
org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
- org.eclipse.emf.transaction
+ org.eclipse.emf.transaction,
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.infra.nattable.model.editor.tests,
org.eclipse.papyrus.infra.nattable.model.editor.tests.tests
Bundle-Vendor: %Bundle-Vendor
diff --git a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests/src/org/eclipse/papyrus/infra/nattable/model/editor/tests/tests/EditorsTests.java b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests/src/org/eclipse/papyrus/infra/nattable/model/editor/tests/tests/EditorsTests.java
index 411e1e02d4f..8e8bffcdba2 100644
--- a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests/src/org/eclipse/papyrus/infra/nattable/model/editor/tests/tests/EditorsTests.java
+++ b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests/src/org/eclipse/papyrus/infra/nattable/model/editor/tests/tests/EditorsTests.java
@@ -30,6 +30,10 @@ import org.eclipse.papyrus.infra.nattable.model.editor.customeditors.CustomNatta
import org.eclipse.papyrus.infra.nattable.model.editor.customeditors.CustomNattabletesterEditor;
import org.eclipse.papyrus.infra.nattable.model.editor.tests.Activator;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.EditorUtils;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
import org.junit.After;
diff --git a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/META-INF/MANIFEST.MF
index ff8bd984642..064053c6f24 100644
--- a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/META-INF/MANIFEST.MF
@@ -17,7 +17,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.nebula.widgets.nattable.core;bundle-version="1.1.0",
org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.0.0"
+ org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
diff --git a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/src/org/eclipse/papyrus/infra/nattable/tests/tests/TableSelectionProviderTest.java b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/src/org/eclipse/papyrus/infra/nattable/tests/tests/TableSelectionProviderTest.java
index 768e41c661e..85e313ab087 100644
--- a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/src/org/eclipse/papyrus/infra/nattable/tests/tests/TableSelectionProviderTest.java
+++ b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/src/org/eclipse/papyrus/infra/nattable/tests/tests/TableSelectionProviderTest.java
@@ -35,6 +35,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
import org.eclipse.papyrus.infra.nattable.tests.Activator;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.PlatformUI;
diff --git a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/META-INF/MANIFEST.MF
index cdfcc0bfed0..a9327c994c5 100755
--- a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/META-INF/MANIFEST.MF
@@ -23,7 +23,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.7.0",
org.eclipse.papyrus.editor.integration.tests;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0"
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
diff --git a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest.java b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest.java
index 17e8fb2a2aa..6999590bbf8 100755
--- a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest.java
+++ b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest.java
@@ -31,13 +31,13 @@ import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
import org.eclipse.papyrus.infra.nattable.views.tests.Activator;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
import org.eclipse.papyrus.junit.utils.EditorUtils;
import org.eclipse.papyrus.junit.utils.GenericUtils;
import org.eclipse.papyrus.junit.utils.ModelExplorerUtils;
import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
import org.eclipse.papyrus.junit.utils.ProjectUtils;
import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
-import org.eclipse.papyrus.junit.utils.tests.AbstractPapyrusTest;
import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PartInitException;
diff --git a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest2.java b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest2.java
index 068f641e79b..299f78a157f 100755
--- a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest2.java
+++ b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableCreationTest2.java
@@ -48,12 +48,12 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
import org.eclipse.papyrus.infra.nattable.views.tests.Activator;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
import org.eclipse.papyrus.junit.utils.GenericUtils;
import org.eclipse.papyrus.junit.utils.ModelExplorerUtils;
import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
import org.eclipse.papyrus.junit.utils.ProjectUtils;
import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
-import org.eclipse.papyrus.junit.utils.tests.AbstractPapyrusTest;
import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
diff --git a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableVerifyContents.java b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableVerifyContents.java
index 82ba35ca4dd..757e2d756de 100755
--- a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableVerifyContents.java
+++ b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests/src/org/eclipse/papyrus/infra/nattable/views/tests/tests/TableVerifyContents.java
@@ -43,12 +43,12 @@ import org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
import org.eclipse.papyrus.infra.nattable.views.tests.Activator;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
import org.eclipse.papyrus.junit.utils.GenericUtils;
import org.eclipse.papyrus.junit.utils.ModelExplorerUtils;
import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
import org.eclipse.papyrus.junit.utils.ProjectUtils;
import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
-import org.eclipse.papyrus.junit.utils.tests.AbstractPapyrusTest;
import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/META-INF/MANIFEST.MF
index 48eedd638ef..c17645ce8c3 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/META-INF/MANIFEST.MF
@@ -16,7 +16,8 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.106.0",
org.eclipse.swtbot.eclipse.finder;bundle-version="2.2.1",
org.eclipse.swtbot.junit4_x;bundle-version="2.2.1",
org.eclipse.emf.transaction,
- org.eclipse.papyrus.infra.services.resourceloading.preferences;bundle-version="1.0.0"
+ org.eclipse.papyrus.infra.services.resourceloading.preferences;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.papyrus.infra.services.controlmode.tests,
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/AbstractControlModeTest.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/AbstractControlModeTest.java
index 13af95fc6be..6b7f02bbd7c 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/AbstractControlModeTest.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/AbstractControlModeTest.java
@@ -28,6 +28,11 @@ import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.services.controlmode.tests.Messages;
import org.eclipse.papyrus.infra.services.controlmode.tests.StrategyChooserFixture;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.papyrus.junit.utils.HandlerUtils;
+import org.eclipse.papyrus.junit.utils.ModelExplorerUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.uml2.uml.Model;
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/ControlModelTest.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/ControlModelTest.java
index d84cac821e9..ce839faf6ef 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/ControlModelTest.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/ControlModelTest.java
@@ -24,6 +24,9 @@ import org.eclipse.emf.transaction.RunnableWithResult;
import org.eclipse.papyrus.infra.services.controlmode.commands.ControlModeCommandParameterValues;
import org.eclipse.papyrus.infra.services.controlmode.handlers.ControlCommandHandler;
import org.eclipse.papyrus.infra.services.controlmode.tests.Messages;
+import org.eclipse.papyrus.junit.utils.HandlerUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.uml2.uml.PackageableElement;
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/ControlModelWithProfileTest.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/ControlModelWithProfileTest.java
index b3877a90373..4dd1ebceb34 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/ControlModelWithProfileTest.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/control/ControlModelWithProfileTest.java
@@ -24,6 +24,9 @@ import org.eclipse.emf.transaction.RunnableWithResult;
import org.eclipse.papyrus.infra.services.controlmode.commands.ControlModeCommandParameterValues;
import org.eclipse.papyrus.infra.services.controlmode.handlers.ControlCommandHandler;
import org.eclipse.papyrus.infra.services.controlmode.tests.Messages;
+import org.eclipse.papyrus.junit.utils.HandlerUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.uml2.uml.PackageableElement;
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/AbstractUncontrolModelTest.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/AbstractUncontrolModelTest.java
index 627b2cb9330..57587c3fe5e 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/AbstractUncontrolModelTest.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/AbstractUncontrolModelTest.java
@@ -28,6 +28,11 @@ import org.eclipse.papyrus.infra.services.controlmode.tests.Messages;
import org.eclipse.papyrus.infra.services.controlmode.tests.StrategyChooserFixture;
import org.eclipse.papyrus.infra.services.controlmode.tests.control.Activator;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.papyrus.junit.utils.HandlerUtils;
+import org.eclipse.papyrus.junit.utils.ModelExplorerUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.uml2.uml.Model;
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/UncontrolModelTest.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/UncontrolModelTest.java
index 1f7605c8cc1..8ae296d13d0 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/UncontrolModelTest.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/UncontrolModelTest.java
@@ -16,6 +16,9 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.emf.transaction.RunnableWithResult;
import org.eclipse.papyrus.infra.services.controlmode.tests.Messages;
+import org.eclipse.papyrus.junit.utils.HandlerUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
import org.eclipse.swt.widgets.Display;
import org.junit.Assert;
import org.junit.Test;
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/UncontrolModelWithProfileTest.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/UncontrolModelWithProfileTest.java
index e3f7c3b0a35..4776bb9bb18 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/UncontrolModelWithProfileTest.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests/src/org/eclipse/papyrus/infra/services/controlmode/tests/uncontrol/UncontrolModelWithProfileTest.java
@@ -16,6 +16,9 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.emf.transaction.RunnableWithResult;
import org.eclipse.papyrus.infra.services.controlmode.tests.Messages;
+import org.eclipse.papyrus.junit.utils.HandlerUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
import org.eclipse.swt.widgets.Display;
import org.junit.Assert;
import org.junit.Test;
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests/META-INF/MANIFEST.MF
index 8fc4a201dd7..f315999f724 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests/META-INF/MANIFEST.MF
@@ -5,7 +5,8 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="3.8.0",
org.eclipse.papyrus.infra.services.validation;bundle-version="1.0.0",
org.eclipse.uml2.uml;bundle-version="5.0.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.7.0"
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.7.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Fragment-Host: org.eclipse.papyrus.infra.services.edit;bundle-version=
"0.10.0"
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests/src/org/eclipse/papyrus/infra/services/edit/tests/edit/advice/MarkerDeletionAdviceTest.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests/src/org/eclipse/papyrus/infra/services/edit/tests/edit/advice/MarkerDeletionAdviceTest.java
index 25e6d345c35..115c79c6dc2 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests/src/org/eclipse/papyrus/infra/services/edit/tests/edit/advice/MarkerDeletionAdviceTest.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests/src/org/eclipse/papyrus/infra/services/edit/tests/edit/advice/MarkerDeletionAdviceTest.java
@@ -50,6 +50,9 @@ import org.eclipse.papyrus.infra.services.validation.EcoreDiagnostician;
import org.eclipse.papyrus.infra.services.validation.IPapyrusDiagnostician;
import org.eclipse.papyrus.infra.services.validation.ValidationTool;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
import org.eclipse.swt.widgets.Display;
import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.LoopNode;
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/META-INF/MANIFEST.MF
index 1d89f72e8e5..7a867365ca5 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/META-INF/MANIFEST.MF
@@ -3,7 +3,8 @@ Require-Bundle: org.eclipse.uml2.uml;bundle-version="3.1.0",
org.eclipse.papyrus.infra.services.resourceloading.preferences;bundle-version="1.0.0",
org.eclipse.papyrus.uml.resourceloading.profile;bundle-version="1.0.0",
org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Fragment-Host: org.eclipse.papyrus.infra.services.resourceloading;bund
le-version="0.10.0"
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java
index 0e2c6db5a76..86a94cc064b 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java
@@ -39,6 +39,7 @@ import org.eclipse.papyrus.infra.services.resourceloading.OnDemandLoadingModelSe
import org.eclipse.papyrus.infra.services.resourceloading.tests.StrategyChooserFixture;
import org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2.ITestConstants;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Type;
import org.junit.After;
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java
index d3c434da942..ee11d5b6059 100644
--- a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java
@@ -43,6 +43,7 @@ import org.eclipse.papyrus.infra.services.resourceloading.OnDemandLoadingModelSe
import org.eclipse.papyrus.infra.services.resourceloading.tests.StrategyChooserFixture;
import org.eclipse.papyrus.infra.services.resourceloading.tests.testModel2.ITestConstants;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Type;
import org.junit.After;
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/META-INF/MANIFEST.MF
index 16708fcedf5..a0282a51ae3 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/META-INF/MANIFEST.MF
@@ -1,6 +1,7 @@
Manifest-Version: 1.0
Require-Bundle: org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Fragment-Host: org.eclipse.papyrus.sysml.diagram.blockdefinition;bundl
e-version="0.10.0"
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/AbstractTest.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/AbstractTest.java
index 12d281c9e0b..c821d4b285a 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/AbstractTest.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/tests/AbstractTest.java
@@ -20,6 +20,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.sysml.diagram.blockdefinition.Activator;
import org.eclipse.papyrus.uml.diagram.common.helper.CreateOrShowExistingElementHelper;
import org.eclipse.ui.IEditorPart;
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/META-INF/MANIFEST.MF
index be45dcc2291..1b6c537f0a0 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/META-INF/MANIFEST.MF
@@ -1,7 +1,8 @@
Manifest-Version: 1.0
Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Fragment-Host: org.eclipse.papyrus.sysml.diagram.internalblock;bundle-
version="0.10.0"
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/AbstractTest.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/AbstractTest.java
index a996651b4a6..20fd1e39909 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/AbstractTest.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/AbstractTest.java
@@ -20,6 +20,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
import org.eclipse.papyrus.uml.diagram.common.helper.CreateOrShowExistingElementHelper;
import org.eclipse.ui.IEditorPart;
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/META-INF/MANIFEST.MF
index 1b716898637..e9846b1dbd4 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/META-INF/MANIFEST.MF
@@ -1,7 +1,8 @@
Manifest-Version: 1.0
Require-Bundle: org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Fragment-Host: org.eclipse.papyrus.sysml.diagram.parametric;bundle-ver
sion="0.10.1"
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/AbstractTest4B.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/AbstractTest4B.java
index a1cc8fd8d5a..81374de8140 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/AbstractTest4B.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests/src/org/eclipse/papyrus/sysml/diagram/parametric/tests/AbstractTest4B.java
@@ -7,7 +7,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
+ *
* CEA LIST - Initial API and implementation
* Christian W. Damus (CEA) - bug 434993
*
@@ -24,6 +24,7 @@ import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.sysml.diagram.parametric.Activator;
import org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.Constants;
import org.eclipse.papyrus.sysml.diagram.parametric.tests.utils.EditorUtils;
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/META-INF/MANIFEST.MF
index 3ab27134269..c6ed0efc221 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/META-INF/MANIFEST.MF
@@ -7,7 +7,6 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.0.0",
org.eclipse.uml2.uml;bundle-version="4.0.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
@@ -16,7 +15,10 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.sysml;bundle-version="1.0.0",
org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
org.eclipse.gmf.tooling.runtime;bundle-version="3.2.0",
- org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.0.0"
+ org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.common.tests;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.sysml.diagram.requirement.test,
org.eclipse.papyrus.sysml.diagram.requirement.test.canonical,
org.eclipse.papyrus.sysml.diagram.requirement.test.load
@@ -29,7 +31,5 @@ Bundle-Activator: org.eclipse.papyrus.sysml.diagram.requirement.test.A
ctivator
Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.requirement.tes
ts;singleton:=true
-Import-Package: org.eclipse.papyrus.sysml.diagram.requirement,
- org.eclipse.papyrus.sysml.diagram.requirement.provider;resolution:=optional
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.tests/META-INF/MANIFEST.MF
index 87834e965cc..fc170fe5084 100755
--- a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.tests/META-INF/MANIFEST.MF
@@ -16,7 +16,8 @@ Require-Bundle: org.junit;bundle-version="4.11.0",
org.eclipse.papyrus.infra.nattable.model;bundle-version="1.0.0",
org.eclipse.papyrus.sysml;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
- org.eclipse.emf.transaction;bundle-version="1.8.0"
+ org.eclipse.emf.transaction;bundle-version="1.8.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor
diff --git a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/META-INF/MANIFEST.MF
index c567817a9c7..cd01d2e1bce 100755..100644
--- a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/META-INF/MANIFEST.MF
@@ -22,7 +22,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
- org.eclipse.nebula.widgets.nattable.core;bundle-version="1.1.0"
+ org.eclipse.nebula.widgets.nattable.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.sysml.nattable.requirement.tests,
org.eclipse.papyrus.sysml.nattable.requirement.tests.tests
Bundle-Vendor: %providerName
diff --git a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/OpenTableTest.java b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/OpenTableTest.java
index bf0d0180a2a..c96980d7fde 100644
--- a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/OpenTableTest.java
+++ b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/OpenTableTest.java
@@ -24,6 +24,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
import org.eclipse.ui.IEditorPart;
import org.junit.AfterClass;
import org.junit.Assert;
diff --git a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInSysMLModelTest.java b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInSysMLModelTest.java
index 7e4b5692764..120b75c5a46 100644
--- a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInSysMLModelTest.java
+++ b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInSysMLModelTest.java
@@ -38,6 +38,12 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.DisplayUtils;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.papyrus.junit.utils.ModelExplorerUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
@@ -58,7 +64,7 @@ public class TableCreationInSysMLModelTest extends AbstractPapyrusTest {
@ClassRule
public static final HouseKeeper.Static houseKeeper = new HouseKeeper.Static();
-
+
private static Class class_;
private static Class requirement1;
@@ -113,7 +119,7 @@ public class TableCreationInSysMLModelTest extends AbstractPapyrusTest {
@Override
public void run() {
papyrusEditor = houseKeeper.openPapyrusEditor(file);
-
+
try {
TableCreationInSysMLModelTest.view = ModelExplorerUtils.openModelExplorerView();
} catch (PartInitException e) {
diff --git a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInUMLModel.java b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInUMLModel.java
index 34f9d9a49a9..86751ed3138 100644
--- a/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInUMLModel.java
+++ b/tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInUMLModel.java
@@ -25,6 +25,11 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.RunnableWithResult;
import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.GenericUtils;
+import org.eclipse.papyrus.junit.utils.ModelExplorerUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator;
import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
import org.eclipse.swt.widgets.Display;
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/META-INF/MANIFEST.MF
index ef0d2057012..90932d525d9 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/META-INF/MANIFEST.MF
@@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.sysml.modelexplorer;bundle-version="1.0.0",
org.eclipse.papyrus.sysml.service.types;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.papyrus.sysml.diagram.common;bundle-version="1.0.0"
+ org.eclipse.papyrus.sysml.diagram.common;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.0.0.qualifier
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/common/AbstractModelExplorerTest.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/common/AbstractModelExplorerTest.java
index cb804545079..e07b76ccbdd 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/common/AbstractModelExplorerTest.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/common/AbstractModelExplorerTest.java
@@ -37,6 +37,7 @@ import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.resource.additional.AdditionalResourcesModel;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.sysml.modelexplorer.tests.Activator;
import org.eclipse.papyrus.sysml.modelexplorer.tests.utils.EditorUtils;
import org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView;
@@ -383,11 +384,11 @@ public abstract class AbstractModelExplorerTest extends AbstractPapyrusTest {
* in the good order. This is a lot faster than going through the whole tree
* using getChildren of the ContentProvider since our Viewer uses a Hashtable
* to keep track of the revealed elements.
- *
+ *
* However we need to use a dedicated MatchingItem to do the matching,
* and a specific comparer in our viewer so than the equals of MatchingItem is
* used in priority.
- *
+ *
* Please refer to MatchingItem for more infos.
*/
EObject previousParent = null;
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteInModelExplorer.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteInModelExplorer.java
index 7b3c9c765db..c8530425fbd 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteInModelExplorer.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test/org/eclipse/papyrus/sysml/modelexplorer/tests/copypaste/CopyPasteInModelExplorer.java
@@ -21,6 +21,8 @@ import org.eclipse.core.commands.IHandler;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.gmfdiag.common.strategy.IStrategy;
import org.eclipse.papyrus.infra.gmfdiag.common.strategy.paste.PasteStrategyManager;
+import org.eclipse.papyrus.junit.utils.HandlerUtils;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
import org.eclipse.papyrus.sysml.diagram.common.strategy.paste.PartPasteStrategy;
import org.eclipse.papyrus.sysml.modelexplorer.tests.Activator;
import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/META-INF/MANIFEST.MF
index 8f38ad5fcc6..3f1e858e397 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/META-INF/MANIFEST.MF
@@ -12,7 +12,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore.xmi,
org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocatedTest.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocatedTest.java
index 7352b08a1c6..4423c9c4be3 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocatedTest.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocatedTest.java
@@ -17,6 +17,7 @@ package org.eclipse.papyrus.sysml.allocations.tests;
import static org.junit.Assert.fail;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.sysml.allocations.Allocated;
import org.eclipse.papyrus.sysml.allocations.AllocationsFactory;
import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ViewTest.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ViewTest.java
index a4bcbd24c25..c01eefb87d1 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ViewTest.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/modelelements/tests/ViewTest.java
@@ -17,6 +17,7 @@ package org.eclipse.papyrus.sysml.modelelements.tests;
import static org.junit.Assert.fail;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.sysml.modelelements.ModelelementsFactory;
import org.eclipse.papyrus.sysml.modelelements.ModelelementsPackage;
import org.eclipse.papyrus.sysml.modelelements.View;
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPortTest.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPortTest.java
index 6a4407af623..152fa2ed914 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPortTest.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPortTest.java
@@ -17,6 +17,7 @@ package org.eclipse.papyrus.sysml.portandflows.tests;
import static org.junit.Assert.fail;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
import org.eclipse.papyrus.sysml.portandflows.FlowPort;
import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPropertyTest.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPropertyTest.java
index 3e0a4b0265e..e2b5f7c5ba9 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPropertyTest.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/FlowPropertyTest.java
@@ -17,6 +17,7 @@ package org.eclipse.papyrus.sysml.portandflows.tests;
import static org.junit.Assert.fail;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
import org.eclipse.papyrus.sysml.portandflows.FlowProperty;
import org.eclipse.papyrus.sysml.portandflows.PortandflowsFactory;
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementRelatedTest.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementRelatedTest.java
index 8656b4a11b6..07633d3aa66 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementRelatedTest.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementRelatedTest.java
@@ -17,6 +17,7 @@ package org.eclipse.papyrus.sysml.requirements.tests;
import static org.junit.Assert.fail;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.sysml.requirements.Requirement;
import org.eclipse.papyrus.sysml.requirements.RequirementRelated;
import org.eclipse.papyrus.sysml.requirements.RequirementsFactory;
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementTest.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementTest.java
index 11264e92c59..212661e44ba 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementTest.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/RequirementTest.java
@@ -17,6 +17,7 @@ package org.eclipse.papyrus.sysml.requirements.tests;
import static org.junit.Assert.fail;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.sysml.requirements.Requirement;
import org.eclipse.papyrus.sysml.requirements.RequirementsFactory;
import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/TestCaseTest.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/TestCaseTest.java
index dc2a7e15670..d1dfacd8071 100644
--- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/TestCaseTest.java
+++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/requirements/tests/TestCaseTest.java
@@ -17,6 +17,7 @@ package org.eclipse.papyrus.sysml.requirements.tests;
import static org.junit.Assert.fail;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.sysml.requirements.Requirement;
import org.eclipse.papyrus.sysml.requirements.RequirementsFactory;
import org.eclipse.papyrus.sysml.requirements.RequirementsPackage;
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/.classpath
deleted file mode 100644
index 23f23cf2994..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="test"/>
- <classpathentry kind="src" path="test-gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/.project
deleted file mode 100644
index 2bc5e35c213..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.diagram.clazz.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 92b4d8fe254..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Thu Jan 14 09:42:02 CET 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 00a6d8f3670..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,34 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
- org.eclipse.papyrus.editor;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.0.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
- org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime,
- org.eclipse.ui.ide;bundle-version="3.10.0",
- org.eclipse.emf.common.ui;bundle-version="2.9.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0"
-Export-Package: org.eclipse.papyrus.diagram.clazz.test.createFromPalette,
- org.eclipse.papyrus.uml.diagram.clazz.test,
- org.eclipse.papyrus.uml.diagram.clazz.test.canonical,
- org.eclipse.papyrus.uml.diagram.clazz.test.load
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.0.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.clazz.test.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.clazz.tests
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/about.html b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/about.html
deleted file mode 100644
index 82d49bf5f81..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/build.properties
deleted file mode 100644
index 1a90ec3bd70..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-source.. = test/,\
- test-gen/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- org.eclipse.papyrus.uml.diagram.clazz.test.launch,\
- plugin.properties
-src.includes = about.html
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/plugin.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/plugin.properties
deleted file mode 100644
index 888a11daca8..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#################################################################################
-# Copyright (c) 2008 CEA LIST.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - initial API and implementation
-##################################################################################
-pluginName=Papyrus Class Diagram Test
-providerName=Eclipse Modeling Project
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/Activator.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/Activator.java
deleted file mode 100644
index d24df4f6bed..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/Activator.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.diagram.clazz.tests";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java
deleted file mode 100644
index a4cc80b0140..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test;
-
-import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AllCanonicalTests;
-import org.eclipse.papyrus.uml.diagram.clazz.test.legacy.PackageDiagramLegacyTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-/**
- * All tests together.
- */
-@RunWith(Suite.class)
-@SuiteClasses({
-// canonical
-AllCanonicalTests.class,
-PackageDiagramLegacyTest.class
-// load
-//LoadTests.class
-})
-public class AllTests {
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/IClassDiagramTestsConstants.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/IClassDiagramTestsConstants.java
deleted file mode 100644
index 9717ae52359..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/IClassDiagramTestsConstants.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test;
-
-public interface IClassDiagramTestsConstants {
-
- /** name of the test project */
- public final String PROJECT_NAME = "ClassDiagramTestProject";
-
- /** name of the test model */
- public final String FILE_NAME = "ClassDiagramTest.di";
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AbstractPapyrusTestCase.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AbstractPapyrusTestCase.java
deleted file mode 100644
index 4a15c471cbd..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AbstractPapyrusTestCase.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
-
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
-
-/**
- * The Class AbstractPapyrusTestCase.
- */
-public abstract class AbstractPapyrusTestCase extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
-
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new CreateClassDiagramCommand();
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java
deleted file mode 100644
index 5e489423ea4..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-/**
- * All test in canonical package
- */
-@RunWith(Suite.class)
-@SuiteClasses({
-// top nodes
-TestClassDiagramTopNode.class,
-// child nodes
-TestClassDiagramChildNode.class,
-//labelNodes
-TestClassDiagramChildLabel.class,
-//test links
-TestClassDiagramLink.class,
-//test links owned by source
-TestClassDiagramLinkOwnedBySource.class,
-// multilinks
-TestMutliLink.class,
-//containmentLink
-TestClassDiagramContainment.class,
-//test the order for the drop
-TestDropfunction.class,
-//test is a static operation is underlined
-TestStaticFeatureRepresentation.class,
-//test nested classifier
-TestClassDiagramNestedClassifier.class,
-})
-public class AllCanonicalTests {
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildLabel.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildLabel.java
deleted file mode 100644
index cb82da2bf2c..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildLabel.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Nizar GUEDIDI (CEA LIST) - Add tests for Primitive Type properties and operations
- * Nizar GUEDIDI (CEA LIST) - Add tests for nested classifier compartments
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
-
-import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.junit.framework.classification.FailingTest;
-import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassAttributeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNestedClassifierCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassOperationCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentAttributeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentNestedClassifierCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentOperationCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEnumerationLiteralCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationSlotCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceAttributeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceNestedClassifierCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceOperationCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeAttributeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeOperationCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalAttributeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.tests.canonical.TestChildLabel;
-import org.junit.Test;
-
-/**
- * The Class TestClassDiagramChildLabel.
- */
-public class TestClassDiagramChildLabel extends TestChildLabel {
- @Override
- public DiagramUpdater getDiagramUpdater() {
- return CustomUMLDiagramUpdater.INSTANCE;
- }
-
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new CreateClassDiagramCommand();
- }
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- @Test
- @FailingTest
- public void testToManageInstanceSlot() {
- //instance specification
- testToManageTopNode(UMLElementTypes.InstanceSpecification_2001, UMLElementTypes.Slot_3030, InstanceSpecificationSlotCompartmentEditPart.VISUAL_ID, "<UNDEFINED>");
- }
-
- @Test
- public void testToManageComponentProperty() {
- //instance specification
- testToManageTopNodeWithMask(UMLElementTypes.Component_2002, UMLElementTypes.Property_3002, ComponentAttributeCompartmentEditPart.VISUAL_ID,"Attribute");
- }
-
- @Test
- public void testToManageComponentNestedClass() {
- //Class
- testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Class_3004, ComponentNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageComponentNestedInterface() {
- //Interface
- testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Interface_3037, ComponentNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageComponentNestedSignal() {
- //Signal
- testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Signal_3051, ComponentNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageComponentNestedDataType() {
- //Data Type
- testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.DataType_3045, ComponentNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageComponentNestedEnumeration() {
- //Enumeration
- testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Enumeration_3053, ComponentNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageComponentNestedPrimitiveType() {
- //primitive Type
- testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.PrimitiveType_3046, ComponentNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageComponentOperation() {
- //instance specification
- testToManageTopNodeWithMask(UMLElementTypes.Component_2002, UMLElementTypes.Operation_3003, ComponentOperationCompartmentEditPart.VISUAL_ID,null);
- }
-
- @Test
- public void testToManageSignalProperty() {
- //instance specification
- testToManageTopNodeWithMask(UMLElementTypes.Signal_2003, UMLElementTypes.Property_3005, SignalAttributeCompartmentEditPart.VISUAL_ID,"Attribute");
- }
-
- @Test
- public void testToManageInterfaceProperty() {
- //interface
- testToManageTopNodeWithMask(UMLElementTypes.Interface_2004, UMLElementTypes.Property_3006, InterfaceAttributeCompartmentEditPart.VISUAL_ID,"Attribute");
- }
-
- @Test
- public void testToManageInterfaceOperation() {
- //interface
- testToManageTopNodeWithMask(UMLElementTypes.Interface_2004, UMLElementTypes.Operation_3007, InterfaceOperationCompartmentEditPart.VISUAL_ID,null);
- }
-
- @Test
- public void testToManageInterfaceNestedClass() {
- //Class
- testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Class_3008, InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageInterfaceNestedInterface() {
- //Interface
- testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Interface_3038, InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageInterfaceNestedSignal() {
- //Signal
- testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Signal_3049, InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageInterfaceNestedDataType() {
- //Data Type
- testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.DataType_3043, InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageInterfaceNestedEnumeration() {
- //Enumeration
- testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Enumeration_3054, InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageInterfaceNestedPrimitiveType() {
- //Primitive Type
- testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.PrimitiveType_3048, InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageEnumerationLiteralEnumeration() {
- //Enumeration
- testToManageTopNode(UMLElementTypes.Enumeration_2006, UMLElementTypes.EnumerationLiteral_3017, EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageClassProperty() {
- //Enumeration
- testToManageTopNodeWithMask(UMLElementTypes.Class_2008, UMLElementTypes.Property_3012, ClassAttributeCompartmentEditPart.VISUAL_ID,"Attribute");
- }
-
- @Test
- public void testToManageClassReception() {
- //Enumeration
- testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Reception_3011, ClassOperationCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageClassOperation() {
- //Enumeration
- testToManageTopNodeWithMask(UMLElementTypes.Class_2008, UMLElementTypes.Operation_3013, ClassOperationCompartmentEditPart.VISUAL_ID,null);
- }
-
- @Test
- public void testToManageClassNestedClass() {
- //class
- testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Class_3014, ClassNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageClassNestedInetrface() {
- //Interface
- testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Interface_3036, ClassNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageClassNestedSignal() {
- //Signal
- testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Signal_3050, ClassNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageClassNestedDataType() {
- //Data Type
- testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.DataType_3044, ClassNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageClassNestedEnumeration() {
- //Enumeration
- testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Enumeration_3052, ClassNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageClassNestedPrimitiveType() {
- //Primitive Type
- testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.PrimitiveType_3047, ClassNestedClassifierCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageComponentReception() {
- //class
- testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Reception_3011, ComponentOperationCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManageInterfaceReception() {
- //class
- testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Reception_3039, InterfaceOperationCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testToManagePrimitiveTypeProperty() {
- //class
- testToManageTopNodeWithMask(UMLElementTypes.PrimitiveType_2009, UMLElementTypes.Property_3041, PrimitiveTypeAttributeCompartmentEditPart.VISUAL_ID,"Attribute");
- }
-
- @Test
- public void testToManagePrimitiveTypeOperation() {
- //class
- testToManageTopNodeWithMask(UMLElementTypes.PrimitiveType_2009, UMLElementTypes.Operation_3042, PrimitiveTypeOperationCompartmentEditPart.VISUAL_ID,null);
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildNode.java
deleted file mode 100644
index 8eaa199c9b4..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildNode.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
-
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.junit.framework.classification.FailingTest;
-import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.tests.canonical.TestChildNode;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.junit.Test;
-
-/**
- * The Class TestClassDiagramChildNode.
- */
-public class TestClassDiagramChildNode extends TestChildNode {
-
- @Override
- public DiagramUpdater getDiagramUpdater() {
- return CustomUMLDiagramUpdater.INSTANCE;
- }
- @Override
- protected CreateViewRequest createViewRequestShapeContainer() {
- return CreateViewRequestFactory.getCreateShapeRequest(UMLElementTypes.Package_2007, getDiagramEditPart().getDiagramPreferencesHint());
- }
-
- @Override
- public boolean isTestAffixedNode() {
- return true;
- }
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected boolean isSemanticTest() {
- return true;
- }
-
- /**
- * Test to manage component.
- */
- @Test
- public void testToManageComponent() {
- testToManageNode(UMLElementTypes.Component_3021, UMLPackage.eINSTANCE.getComponent(), UMLElementTypes.Package_3009, true);
- }
-
- /**
- * Test to manage instance specification.
- */
- @Test
- public void testToManageInstanceSpecification() {
- testToManageNode(UMLElementTypes.InstanceSpecification_3020, UMLPackage.eINSTANCE.getInstanceSpecification(), UMLElementTypes.Package_3009, true);
- }
-
- /**
- * Test to manage signal.
- */
- @Test
- public void testToManageSignal() {
- testToManageNode(UMLElementTypes.Signal_3022, UMLPackage.eINSTANCE.getSignal(), UMLElementTypes.Package_3009, true);
- }
-
- /**
- * Test to manage model.
- */
- @Test
- @FailingTest
- public void testToManageModel() {
- testToManageNode(UMLElementTypes.Model_3024, UMLPackage.eINSTANCE.getModel(), UMLElementTypes.Package_3009, true);
- }
-
- /**
- * Test to manage enumeration.
- */
- @Test
- public void testToManageEnumeration() {
- testToManageNode(UMLElementTypes.Enumeration_3025, UMLPackage.eINSTANCE.getEnumeration(), UMLElementTypes.Package_3009, true);
- }
-
- /**
- * Test to manage i package.
- */
- @Test
- @FailingTest
- public void testToManageIPackage() {
- testToManageNode(UMLElementTypes.Package_3009, UMLPackage.eINSTANCE.getPackage(), UMLElementTypes.Package_3009, true);
- }
-
- /**
- * Test to manage class.
- */
- @Test
- public void testToManageClass() {
- testToManageNode(UMLElementTypes.Class_3010, UMLPackage.eINSTANCE.getClass_(), UMLElementTypes.Package_3009, true);
- }
-
- /**
- * Test to manage InforamtionItem.
- */
- @Test
- public void testToManageInformationItem() {
- testToManageNode(UMLElementTypes.InformationItem_3040, UMLPackage.eINSTANCE.getInformationItem(), UMLElementTypes.Package_3009, true);
- }
-
- /**
- * Test to manage primitive type.
- */
- @Test
- public void testToManagePrimitiveType() {
- testToManageNode(UMLElementTypes.PrimitiveType_3026, UMLPackage.eINSTANCE.getPrimitiveType(), UMLElementTypes.Package_3009, true);
- }
-
- /**
- * Test to manage data type.
- */
- @Test
- public void testToManageDataType() {
- testToManageNode(UMLElementTypes.DataType_3027, UMLPackage.eINSTANCE.getDataType(), UMLElementTypes.Package_3009, true);
- }
-
- /**
- * Test to manage constraint.
- */
- @Test
- public void testToManageConstraint() {
- testToManageNode(UMLElementTypes.Constraint_3029, UMLPackage.eINSTANCE.getConstraint(), UMLElementTypes.Package_3009, true);
- }
-
- /**
- * Test to manage comment.
- */
- @Test
- public void testToManageComment() {
- testToManageNode(UMLElementTypes.Comment_3028, UMLPackage.eINSTANCE.getComment(), UMLElementTypes.Package_3009, true);
- }
-
- /**
- * Test to manage comment.
- */
- @Test
- public void testToManageInterface() {
- testToManageNode(UMLElementTypes.Interface_3023, UMLPackage.eINSTANCE.getInterface(), UMLElementTypes.Package_3009, true);
- }
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new CreateClassDiagramCommand();
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramContainment.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramContainment.java
deleted file mode 100644
index 2cfdc8ed869..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramContainment.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
-
-import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.tests.canonical.TestContainmentLink;
-import org.junit.Test;
-
-public class TestClassDiagramContainment extends TestContainmentLink {
-
- @Override
- public DiagramUpdater getDiagramUpdater() {
- return CustomUMLDiagramUpdater.INSTANCE;
- }
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new CreateClassDiagramCommand();
- }
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- /**
- * Test to manage containmentLink.
- */
- @Test
- public void testToManageContainment() {
- testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Link_4023, UMLElementTypes.Package_2007);
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLink.java
deleted file mode 100644
index b80d8c0dd48..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLink.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
-
-import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.junit.framework.classification.FailingTest;
-import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink;
-import org.junit.Test;
-
-/**
- * The Class TestClassDiagramLink use to test link that are contained by the owner of the target and the source
- */
-public class TestClassDiagramLink extends TestLink {
-
- @Override
- public DiagramUpdater getDiagramUpdater() {
- return CustomUMLDiagramUpdater.INSTANCE;
- }
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new CreateClassDiagramCommand();
- }
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- /**
- * Test to manage component.
- */
- @Test
- @FailingTest
- public void testToManageDependency() {
- testToManageLink(UMLElementTypes.Component_2002, UMLElementTypes.Component_2002, UMLElementTypes.Dependency_4008, UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage Association.
- */
- @Test
- @FailingTest
- public void testToManageAssociation() {
- testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Association_4001, UMLElementTypes.Package_2007, true,"srcMulA_cla");
- }
-
- //test generatlization
- //test interfaceRealization
- //test substitution
- /**
- * Test to manage Realization
- */
- @Test
- @FailingTest
- public void testToManageRealization() {
- testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Realization_4005, UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage Abstraction
- */
- @Test
- @FailingTest
- public void testToManageAbstraction() {
- testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Abstraction_4006, UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage Usage
- */
- @Test
- @FailingTest
- public void testToManageUsage() {
- testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Usage_4007, UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage Usage
- */
- @Test
- @FailingTest
- public void testToManageInformationFlow() {
- testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.InformationFlow_4026, UMLElementTypes.Package_2007, true);
- }
- //test Element import
- //testPackageImport
- //test comment link
- //test constraintLink
- //test template binding
- //test instancespecificationLink
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLinkOwnedBySource.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLinkOwnedBySource.java
deleted file mode 100644
index 012629d8026..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLinkOwnedBySource.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
-
-import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.tests.canonical.TestLinkOwnedBySource;
-import org.junit.Test;
-
-/**
- * The Class TestClassDiagramLink use to test link that are contained by the owner of the target and the source
- */
-public class TestClassDiagramLinkOwnedBySource extends TestLinkOwnedBySource {
-
- @Override
- public DiagramUpdater getDiagramUpdater() {
- return CustomUMLDiagramUpdater.INSTANCE;
- }
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new CreateClassDiagramCommand();
- }
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- /**
- * Test to manage Association.
- */
- @Test
- public void testToManageGeneralization() {
- testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Generalization_4002, UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage InterfaceRealization.
- */
- @Test
- public void testToManageInterfaceRealization() {
- testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Interface_2004, UMLElementTypes.InterfaceRealization_4003, UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage Substitution.
- */
- @Test
- public void testToManageSubstitution() {
- testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Substitution_4004, UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage ElementImport.
- */
- @Test
- public void testToManageElementImport() {
- testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.ElementImport_4009, UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage ElementImport.
- */
- @Test
- public void testToManagePackageImport() {
- testToManageLink(UMLElementTypes.Package_2007, UMLElementTypes.Package_2007, UMLElementTypes.PackageImport_4010, UMLElementTypes.Package_2007, true);
- }
- //test comment link
- //test constraintLink
- //test template binding
- //test containment link
- //test instancespecificationLink
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramNestedClassifier.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramNestedClassifier.java
deleted file mode 100644
index 7f54bf1fe29..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramNestedClassifier.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
-
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNestedClassifierCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentNestedClassifierCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceNestedClassifierCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.tests.canonical.TestNested;
-import org.junit.Test;
-
-/**
- * The Class TestClassDiagramNestedClassifier.
- */
-public class TestClassDiagramNestedClassifier extends TestNested {
-
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new CreateClassDiagramCommand();
- }
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- @Test
- public void testToManageComponentNestedClass() {
- //Class
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Component_3021, UMLElementTypes.Class_3004, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageComponentNestedInterface() {
- //Interface
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Component_3021, UMLElementTypes.Interface_3037, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageComponentNestedSignal() {
- //Signal
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Component_3021, UMLElementTypes.Signal_3051, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageComponentNestedDataType() {
- //Data Type
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Component_3021, UMLElementTypes.DataType_3045, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageComponentNestedEnumeration() {
- //Enumeration
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Component_3021, UMLElementTypes.Enumeration_3053, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageComponentNestedPrimitiveType() {
- //primitive Type
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Component_3021, UMLElementTypes.PrimitiveType_3046, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageInterfaceNestedClass() {
- //Class
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Interface_3023, UMLElementTypes.Class_3008, PackagePackageableElementCompartmentEditPart.VISUAL_ID, InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageInterfaceNestedInterface() {
- //Interface
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Interface_3023, UMLElementTypes.Interface_3038, PackagePackageableElementCompartmentEditPart.VISUAL_ID, InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageInterfaceNestedSignal() {
- //Signal
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Interface_3023, UMLElementTypes.Signal_3049, PackagePackageableElementCompartmentEditPart.VISUAL_ID, InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageInterfaceNestedDataType() {
- //Data Type
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Interface_3023, UMLElementTypes.DataType_3043, PackagePackageableElementCompartmentEditPart.VISUAL_ID, InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageInterfaceNestedEnumeration() {
- //Enumeration
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Interface_3023, UMLElementTypes.Enumeration_3054, PackagePackageableElementCompartmentEditPart.VISUAL_ID, InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageInterfaceNestedPrimitiveType() {
- //Primitive Type
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Interface_3023, UMLElementTypes.PrimitiveType_3048, PackagePackageableElementCompartmentEditPart.VISUAL_ID, InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageClassNestedClass() {
- //class
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Class_3010, UMLElementTypes.Class_3014, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageClassNestedInetrface() {
- //Interface
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Class_3010, UMLElementTypes.Interface_3036, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageClassNestedSignal() {
- //Signal
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Class_3010, UMLElementTypes.Signal_3050, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageClassNestedDataType() {
- //Data Type
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Class_3010, UMLElementTypes.DataType_3044, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageclassNestedEnumeration() {
- //Enumeration
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Class_3010, UMLElementTypes.Enumeration_3052, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-
- @Test
- public void testToManageClassNestedPrimitiveType() {
- //Primitive Type
- testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Class_3010, UMLElementTypes.PrimitiveType_3047, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID);
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramTopNode.java
deleted file mode 100644
index f641deeb2c8..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramTopNode.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
-
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.tests.canonical.TestTopNode;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.junit.Test;
-
-/**
- * The Class TestClassDiagramTopNode.
- */
-public class TestClassDiagramTopNode extends TestTopNode {
-
- @Override
- public DiagramUpdater getDiagramUpdater() {
- return CustomUMLDiagramUpdater.INSTANCE;
- }
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new CreateClassDiagramCommand();
- }
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- /**
- * Test to manage component.
- */
- @Test
- public void testToManageComponent() {
- testToManageNode(UMLElementTypes.Component_2002, UMLPackage.eINSTANCE.getComponent(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage instance specification.
- */
- @Test
- public void testToManageInstanceSpecification() {
- testToManageNode(UMLElementTypes.InstanceSpecification_2001, UMLPackage.eINSTANCE.getInstanceSpecification(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage signal.
- */
- @Test
- public void testToManageSignal() {
- testToManageNode(UMLElementTypes.Signal_2003, UMLPackage.eINSTANCE.getSignal(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage model.
- */
- @Test
- public void testToManageModel() {
- testToManageNode(UMLElementTypes.Model_2005, UMLPackage.eINSTANCE.getModel(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage enumeration.
- */
- @Test
- public void testToManageEnumeration() {
- testToManageNode(UMLElementTypes.Enumeration_2006, UMLPackage.eINSTANCE.getEnumeration(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage i package.
- */
- @Test
- public void testToManageIPackage() {
- testToManageNode(UMLElementTypes.Package_2007, UMLPackage.eINSTANCE.getPackage(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage class.
- */
- @Test
- public void testToManageClass() {
- testToManageNode(UMLElementTypes.Class_2008, UMLPackage.eINSTANCE.getClass_(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage primitive type.
- */
- @Test
- public void testToManagePrimitiveType() {
- testToManageNode(UMLElementTypes.PrimitiveType_2009, UMLPackage.eINSTANCE.getPrimitiveType(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage data type.
- */
- @Test
- public void testToManageDataType() {
- testToManageNode(UMLElementTypes.DataType_2010, UMLPackage.eINSTANCE.getDataType(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage constraint.
- */
- @Test
- public void testToManageConstraint() {
- testToManageNode(UMLElementTypes.Constraint_2011, UMLPackage.eINSTANCE.getConstraint(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage comment.
- */
- @Test
- public void testToManageComment() {
- testToManageNode(UMLElementTypes.Comment_2012, UMLPackage.eINSTANCE.getComment(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage component.
- */
- @Test
- public void testToManageInformationItem() {
- testToManageNode(UMLElementTypes.InformationItem_2099, UMLPackage.eINSTANCE.getInformationItem(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage component.
- */
- @Test
- public void testToManageInterface() {
- testToManageNode(UMLElementTypes.Interface_2004, UMLPackage.eINSTANCE.getInterface(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage component.
- */
- @Test
- public void testToManageTimeObservation() {
- testToManageNode(UMLElementTypes.TimeObservation_2096, UMLPackage.eINSTANCE.getTimeObservation(), UMLElementTypes.Package_2007, true);
- }
-
- /**
- * Test to manage component.
- */
- @Test
- public void testToManageDurationObservation() {
- testToManageNode(UMLElementTypes.DurationObservation_2095, UMLPackage.eINSTANCE.getDurationObservation(), UMLElementTypes.Package_2007, true);
- }
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected CreateViewRequest createViewRequestShapeContainer() {
- return CreateViewRequestFactory.getCreateShapeRequest(UMLElementTypes.Package_2007, getDiagramEditPart().getDiagramPreferencesHint());
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestDropfunction.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestDropfunction.java
deleted file mode 100644
index a8b509528a7..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestDropfunction.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEnumerationLiteralCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.tests.canonical.TestChildLabel;
-import org.eclipse.uml2.uml.Element;
-import org.junit.Test;
-
-/**
- * test in order to verify if the drop respect the order of the selection
- * Create an enumeration, create subenumerationliterals, select them, drop into the diagram
- * the order of enumeration list has to be the same that as the list in the request drop.
- *
- */
-public class TestDropfunction extends TestChildLabel {
-
- @Override
- public DiagramUpdater getDiagramUpdater() {
- return CustomUMLDiagramUpdater.INSTANCE;
- }
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new CreateClassDiagramCommand();
- }
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- public static int MAX = 20;
-
- @Test
- public void testDropWithOrder() {
- testToCreateATopNode(UMLElementTypes.Enumeration_2006);
- testToCreateSetOfNode(UMLElementTypes.EnumerationLiteral_3017, EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID);
- testSetOfDrop(UMLElementTypes.EnumerationLiteral_3017, EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID);
- }
-
- protected void testToCreateSetOfNode(IElementType type, int containerType) {
- ListCompartmentEditPart compartment = null;
- int index = 0;
- while(compartment == null && index < getTopEditPart().getChildren().size()) {
- if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
- compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
- }
- index++;
- }
- assertTrue("Container not found", compartment != null);
- //CREATION
- assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
- for(int i = 0; i < MAX; i++) {
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = compartment.getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- //creation of label
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
- //deletion view
- Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
- command = ((GraphicalEditPart)compartment.getChildren().get(0)).getCommand(deleteViewRequest);
- assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- }
- }
-
- /**
- * Test drop.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- protected void testSetOfDrop(IElementType type, int containerType) {
- ListCompartmentEditPart compartment = null;
- int index = 0;
- while(compartment == null && index < getTopEditPart().getChildren().size()) {
- if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
- compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
- }
- index++;
- }
- assertTrue("Container not found", compartment != null);
- //DROP
- assertTrue(DROP + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
- assertTrue(DROP + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == MAX);
- DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
- ArrayList<Element> list = new ArrayList<Element>();
- for(int i = 0; i < MAX; i++) {
- list.add(getRootSemanticModel().getOwnedElements().get(i));
- }
- dropObjectsRequest.setObjects(list);
- dropObjectsRequest.setLocation(new Point(20, 20));
- Command command = compartment.getCommand(dropObjectsRequest);
- assertNotNull(DROP + COMMAND_NULL, command);
- assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DROP + TEST_THE_EXECUTION, compartment.getChildren().size() == MAX);
- assertTrue(DROP + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == MAX);
- for(int i = 0; i < MAX; i++) {
- assertEquals(getRootSemanticModel().getOwnedElements().get(i), ((GraphicalEditPart)compartment.getChildren().get(i)).resolveSemanticElement());
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestMutliLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestMutliLink.java
deleted file mode 100644
index 0ec49540f5f..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestMutliLink.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
-
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractTestMultiLink;
-import org.junit.Test;
-
-public class TestMutliLink extends AbstractTestMultiLink {
-
- @Override
- protected CreateViewRequest createViewRequestShapeContainer() {
- // TODO Auto-generated method stub
- return CreateViewRequestFactory.getCreateShapeRequest(UMLElementTypes.Class_2008, getDiagramEditPart().getDiagramPreferencesHint());
- }
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- /**
- * Test to manage dependency.
- */
- @Test
- public void testToManageMultiDependency() {
- testToManageMultiLink(UMLElementTypes.Dependency_4008, UMLElementTypes.Dependency_4018, true);
- }
-
- /**
- * Test to manage multiassociation.
- */
- @Test
- public void testToManageMultiAssociation() {
- testToManageMultiLink(UMLElementTypes.Association_4001, UMLElementTypes.Association_4019, false);
- }
-
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new CreateClassDiagramCommand();
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java
deleted file mode 100644
index ea0ab10e209..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.draw2d.text.FlowPage;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.draw2d.ui.text.TextFlowEx;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassAttributeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassOperationCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.tests.canonical.TestChildLabel;
-import org.eclipse.uml2.uml.Feature;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.junit.Test;
-
-/**
- * this class is used to test if feature are a representation for static
- *
- */
-public class TestStaticFeatureRepresentation extends TestChildLabel {
-
- @Override
- public DiagramUpdater getDiagramUpdater() {
- return CustomUMLDiagramUpdater.INSTANCE;
- }
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new CreateClassDiagramCommand();
- }
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- @Test
- public void testStaticOperation() {
- testToCreateATopNode(UMLElementTypes.Class_2008);
- testToTestStaticoperation(UMLElementTypes.Operation_3013, ClassOperationCompartmentEditPart.VISUAL_ID);
- }
-
- @Test
- public void testStaticProperty() {
- testToCreateATopNode(UMLElementTypes.Class_2008);
- testToTestStaticoperation(UMLElementTypes.Property_3012, ClassAttributeCompartmentEditPart.VISUAL_ID);
- }
-
- protected void testToTestStaticoperation(IElementType type, int containerType) {
- ListCompartmentEditPart compartment = null;
- int index = 0;
- while(compartment == null && index < getTopEditPart().getChildren().size()) {
- if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
- compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
- }
- index++;
- }
- assertTrue("Container not found", compartment != null);
- //CREATION
- assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = compartment.getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- //creation of label
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
- assertTrue("ceated editpart is a feature editpart", ((compartment.getChildren().get(0)) instanceof UMLCompartmentEditPart));
- UMLCompartmentEditPart featureEditPart = (UMLCompartmentEditPart)compartment.getChildren().get(0);
- //make it static
- SetCommand setStaticOperation = new SetCommand(diagramEditor.getEditingDomain(), featureEditPart.resolveSemanticElement(), UMLPackage.eINSTANCE.getFeature_IsStatic(), true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(new ICommandProxy(new EMFtoGMFCommandWrapper(setStaticOperation)));
- TextFlowEx label = (TextFlowEx)((FlowPage)featureEditPart.getFigure().getChildren().get(0)).getChildren().get(0);
- featureEditPart.refresh();
- //the semantic element is static
- assertTrue("the feature is static", ((Feature)featureEditPart.resolveSemanticElement()).isStatic());
- //the graphical element is underlined
- assertTrue("the figigure is drawn as static", label.isTextUnderlined());
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load100ClassTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load100ClassTest.java
deleted file mode 100644
index 4bbe6432c03..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load100ClassTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.load;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AbstractPapyrusTestCase;
-import org.junit.Ignore;
-import org.junit.Test;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class Load100ClassTest.
- */
-public class Load100ClassTest extends AbstractPapyrusTestCase {
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type) {
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull("CREATION: creation command null", command);
- assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- }
-
- /**
- * Test load100 class.
- */
- @Ignore
- @Test
- public void testLoad100Class() {
- for(int i = 0; i < 100; i++) {
- testToCreateANode(UMLElementTypes.Class_2008);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load10ClassTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load10ClassTest.java
deleted file mode 100644
index 4c36e954e71..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load10ClassTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.load;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AbstractPapyrusTestCase;
-import org.junit.Ignore;
-import org.junit.Test;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class Load10ClassTest.
- */
-public class Load10ClassTest extends AbstractPapyrusTestCase {
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type) {
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull("CREATION: creation command null", command);
- assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- }
-
- /**
- * Test load10 class.
- */
- @Ignore
- @Test
- public void testLoad10Class() {
- for(int i = 0; i < 10; i++) {
- testToCreateANode(UMLElementTypes.Class_2008);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load200ClassTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load200ClassTest.java
deleted file mode 100644
index 7eb5f103cbf..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load200ClassTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.load;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AbstractPapyrusTestCase;
-import org.junit.Ignore;
-import org.junit.Test;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class Load200ClassTest.
- */
-public class Load200ClassTest extends AbstractPapyrusTestCase {
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type) {
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull("CREATION: creation command null", command);
- assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- }
-
- /**
- * Test load200 class.
- */
- @Ignore
- @Test
- public void testLoad200Class() {
- for(int i = 0; i < 200; i++) {
- testToCreateANode(UMLElementTypes.Class_2008);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load300ClassTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load300ClassTest.java
deleted file mode 100644
index 9147d9f7c7d..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load300ClassTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.load;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AbstractPapyrusTestCase;
-import org.junit.Ignore;
-import org.junit.Test;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class Load300ClassTest.
- */
-public class Load300ClassTest extends AbstractPapyrusTestCase {
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type) {
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull("CREATION: creation command null", command);
- assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- }
-
- /**
- * Test load300 class.
- */
- @Ignore
- @Test
- public void testLoad300Class() {
- for(int i = 0; i < 300; i++) {
- testToCreateANode(UMLElementTypes.Class_2008);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load400ClassTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load400ClassTest.java
deleted file mode 100644
index 0622a493169..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load400ClassTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.load;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AbstractPapyrusTestCase;
-import org.junit.Ignore;
-import org.junit.Test;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class Load400ClassTest.
- */
-public class Load400ClassTest extends AbstractPapyrusTestCase {
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type) {
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull("CREATION: creation command null", command);
- assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- }
-
- /**
- * Test load400 class.
- */
- @Ignore
- @Test
- public void testLoad400Class() {
- for(int i = 0; i < 400; i++) {
- testToCreateANode(UMLElementTypes.Class_2008);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load500ClassTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load500ClassTest.java
deleted file mode 100644
index e1fb445985d..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load500ClassTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.load;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AbstractPapyrusTestCase;
-import org.junit.Ignore;
-import org.junit.Test;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class Load500ClassTest.
- */
-public class Load500ClassTest extends AbstractPapyrusTestCase {
-
- @Override
- protected String getProjectName() {
- return IClassDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IClassDiagramTestsConstants.FILE_NAME;
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type) {
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull("CREATION: creation command null", command);
- assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- }
-
- /**
- * Test load500 class.
- */
- @Ignore
- @Test
- public void testLoad500Class() {
- for(int i = 0; i < 500; i++) {
- testToCreateANode(UMLElementTypes.Class_2008);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/LoadTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/LoadTests.java
deleted file mode 100644
index aadba8245f7..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/LoadTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.test.load;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-/**
- * All tests together.
- */
-@RunWith(Suite.class)
-@SuiteClasses({
-// 10 classes
-Load10ClassTest.class,
-// 100 classes
-Load100ClassTest.class,
-// 200 classes
-Load200ClassTest.class,
-// 300 classes
-Load300ClassTest.class,
-// 400 classes
-Load400ClassTest.class,
-// 500 classes
-Load500ClassTest.class, })
-public class LoadTests {
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF
index 54d4dc2daf6..c567f3ed601 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.junit;bundle-version="4.10.0",
org.eclipse.papyrus.uml.appearance;bundle-version="1.0.0",
org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.0.0"
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.uml.diagram.stereotypeproperty
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AbstractPapyrusTestCase.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AbstractPapyrusTestCase.java
index c50ffd0d599..741d93a6d83 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AbstractPapyrusTestCase.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AbstractPapyrusTestCase.java
@@ -29,6 +29,7 @@ import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditor;
import org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand;
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/.classpath
deleted file mode 100644
index 2d1a4302f04..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/.project
deleted file mode 100644
index 95c30608d35..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.diagram.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index a347708599f..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF
deleted file mode 100755
index 293878b71c1..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
- org.eclipse.papyrus.editor;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
- org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.common.core,
- org.eclipse.papyrus.junit.utils;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.diagram.profile;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime,
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0"
-Export-Package: org.eclipse.papyrus.uml.diagram.tests.appearance,
- org.eclipse.papyrus.uml.diagram.tests.canonical,
- org.eclipse.papyrus.uml.diagram.tests.createFromPalette,
- org.eclipse.papyrus.uml.diagram.tests.edition
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.0.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.tests.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.tests;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/about.html b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/about.html
deleted file mode 100644
index 82d49bf5f81..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/build.properties
deleted file mode 100644
index a8e3182967e..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- about.html
-src.includes = about.html
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/plugin.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/plugin.properties
deleted file mode 100644
index eb1d43752e4..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#################################################################################
-# Copyright (c) 2008 CEA LIST.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - initial API and implementation
-##################################################################################
-pluginName=Papyrus common Diagram
-providerName=Eclipse Modeling Project
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/Activator.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/Activator.java
deleted file mode 100644
index 7d55e837aec..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/Activator.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.diagram.tests"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java
deleted file mode 100644
index 05d03d7aaf5..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java
+++ /dev/null
@@ -1,403 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009, 2014 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 434993
- * Christian W. Damus (CEA) - bug 436047
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests.canonical;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.StringValueStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.NotFoundException;
-import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
-import org.eclipse.papyrus.infra.gmfdiag.common.reconciler.DiagramVersioningUtils;
-import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
-import org.eclipse.papyrus.junit.utils.tests.AbstractPapyrusTest;
-import org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand;
-import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.profile.CreateProfileModelCommand;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.papyrus.uml.tools.model.UmlUtils;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.intro.IIntroPart;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Model;
-import org.eclipse.uml2.uml.Profile;
-import org.eclipse.uml2.uml.util.UMLUtil;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Rule;
-
-/**
- * The Class AbstractPapyrusTestCase.
- */
-public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest {
-
- @Rule
- public final HouseKeeper houseKeeper = new HouseKeeper();
-
- protected boolean operationFailed = false;
-
- /** The Constant CREATION. */
- protected static final String CREATION = "CREATION:"; //$NON-NLS-1$
-
- /** The Constant CONTAINER_CREATION. */
- protected static final String CONTAINER_CREATION = "CONTAINER CREATION: "; //$NON-NLS-1$
-
- /** The Constant DROP. */
- protected static final String DROP = "DROP: "; //$NON-NLS-1$
-
- /** The Constant DESTROY_DELETION. */
- protected static final String DESTROY_DELETION = "DESTROY DELETION: "; //$NON-NLS-1$
-
- /** The Constant COMMAND_NULL. */
- protected static final String COMMAND_NULL = " command null"; //$NON-NLS-1$
-
- /** The Constant VIEW_DELETION. */
- protected static final String VIEW_DELETION = "VIEW DELETION: "; //$NON-NLS-1$
-
- /** The Constant TEST_THE_REDO. */
- protected static final String TEST_THE_REDO = "test the redo"; //$NON-NLS-1$
-
- /** The Constant TEST_THE_UNDO. */
- protected static final String TEST_THE_UNDO = "test the undo"; //$NON-NLS-1$
-
- /** The Constant TEST_THE_EXECUTION. */
- protected static final String TEST_THE_EXECUTION = "test the execution"; //$NON-NLS-1$
-
- /** The Constant TEST_IF_THE_COMMAND_CAN_BE_EXECUTED. */
- protected static final String TEST_IF_THE_COMMAND_CAN_BE_EXECUTED = "test if the command can be executed"; //$NON-NLS-1$
-
- /** The Constant TEST_IF_THE_COMMAND_IS_CREATED. */
- protected static final String TEST_IF_THE_COMMAND_IS_CREATED = "test if the command is created"; //$NON-NLS-1$
-
- /** The Constant INITIALIZATION_TEST. */
- protected static final String INITIALIZATION_TEST = "Intitial State"; //$NON-NLS-1$
-
- /** The Constant CHANGE_CONTAINER. */
- protected static final String CHANGE_CONTAINER = "CHANGE CONTAINER"; //$NON-NLS-1$
-
- /** The papyrus editor. */
- protected IMultiDiagramEditor papyrusEditor;
-
- /** The di resource set. */
- protected ModelSet diResourceSet;
-
- /** The project. */
- protected IProject project;
-
- /** The file. */
- protected IFile file;
-
- /** The diagram editor. */
- protected UmlGmfDiagramEditor diagramEditor = null;
-
- /** The diagram edit part. */
- protected DiagramEditPart diagramEditPart;
-
-
-
- /**
- * @see junit.framework.TestCase#setUp()
- *
- * @throws Exception
- */
- @Before
- public void setUp() throws Exception {
- projectCreation();
-
- }
-
- /**
- * Gets the root view.
- *
- * @return the root view
- */
- protected View getRootView() {
- return getDiagramEditPart().getDiagramView();
- }
-
- /**
- * Gets the root semantic model.
- *
- * @return the root semantic model
- */
- protected Element getRootSemanticModel() {
- return (Element)getRootView().getElement();
- }
-
- /**
- * @see junit.framework.TestCase#tearDown()
- *
- * @throws Exception
- */
- @After
- public void tearDown() throws Exception {
- Runnable runnable = new Runnable() {
-
- public void run() {
- //if the diagram is a Profile we dont save it because we dont need to define it
- if(diagramEditPart == null || !diagramEditPart.getDiagramView().getType().equals("PapyrusUMLProfileDiagram")) { //$NON-NLS-1$
- papyrusEditor.doSave(new NullProgressMonitor());
- }
-
- // diResourceSet.save( new NullProgressMonitor());
- if(diagramEditor != null) {
- diagramEditor.close(true);
- }
- papyrusEditor = null;
- diagramEditPart = null;
- diagramEditor = null;
- }
- };
- Display.getDefault().syncExec(runnable);
- }
-
- /**
- * Gets the diagram edit part.
- *
- * @return the diagram edit part
- */
- protected DiagramEditPart getDiagramEditPart() {
- if(diagramEditPart == null) {
- diagramEditor = (UmlGmfDiagramEditor)papyrusEditor.getActiveEditor();
- diagramEditPart = (DiagramEditPart)papyrusEditor.getAdapter(DiagramEditPart.class);
- Assert.assertNotNull("Cannot find the diagram editor", diagramEditor); //$NON-NLS-1$
- Assert.assertNotNull("Cannot find the Diagram edit part", diagramEditPart); //$NON-NLS-1$
- StringValueStyle style = (StringValueStyle)diagramEditPart.getNotationView().getNamedStyle(NotationPackage.eINSTANCE.getStringValueStyle(), DiagramVersioningUtils.COMPATIBILITY_VERSION);
- Assert.assertNotNull("A version lust be associated to a each diagram", style); //$NON-NLS-1$
- Assert.assertTrue("The created diagram has not a good version", DiagramVersioningUtils.isOfCurrentPapyrusVersion((Diagram)diagramEditPart.getNotationView())); //$NON-NLS-1$
- }
- return diagramEditPart;
- }
-
- protected abstract ICreationCommand getDiagramCommandCreation();
-
- /**
- * Returns the Project
- */
- protected abstract String getProjectName();
-
- /**
- * Returns the File
- */
- protected abstract String getFileName();
-
- protected String[] getRequiredProfiles() {
- return new String[0];
- }
-
- /**
- * Project creation.
- */
- protected void projectCreation() throws Exception {
- // assert the intro is not visible
- Runnable closeIntroRunnable = new Runnable() {
-
- public void run() {
- try {
- IIntroPart introPart = PlatformUI.getWorkbench().getIntroManager().getIntro();
- if(introPart != null) {
- PlatformUI.getWorkbench().getIntroManager().closeIntro(introPart);
- }
- } catch (Exception ex) {
- ex.printStackTrace(System.out);
- Assert.fail(ex.getMessage());
- }
- }
- };
- Display.getDefault().syncExec(closeIntroRunnable);
- /*
- * final String timestamp = Long.toString(System.currentTimeMillis());
- *
- * project = root.getProject("DiagramTestProject_" + timestamp); file =
- * project.getFile("DiagramTest_" + timestamp + ".di"); //$NON-NLS-2$
- */
- project = houseKeeper.createProject(getProjectName());
- file = project.getFile(getFileName());
- this.diResourceSet = houseKeeper.cleanUpLater(new DiResourceSet());
- // at this point, no resources have been created
-
- if(file.exists()) {
- file.delete(true, new NullProgressMonitor());
- }
- if(!file.exists()) {
- // Don't create a zero-byte file. Create an empty XMI document
- Resource diResource = diResourceSet.createResource(URI.createPlatformResourceURI(file.getFullPath().toString(), true));
- diResource.save(null);
- diResource.unload();
- diResourceSet.createsModels(file);
- if(!file.getName().endsWith(".profile.di")) { //$NON-NLS-1$
-
- new CreateUMLModelCommand().createModel(this.diResourceSet);
-
- ServicesRegistry registry = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
- try {
- registry.add(ModelSet.class, Integer.MAX_VALUE, diResourceSet); // High priority to override all contributions
- registry.startRegistry();
- } catch (ServiceException ex) {
- // Ignore exceptions
- }
-
- // Apply the required profiles
- ArrayList<IFile> modifiedFiles = new ArrayList<IFile>();
- modifiedFiles.add(file);
- ICommand commandProfiles = new AbstractTransactionalCommand(diResourceSet.getTransactionalEditingDomain(), "Apply profiles", modifiedFiles) { //$NON-NLS-1$
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- UmlModel resModel = UmlUtils.getUmlModel(diResourceSet);
- EObject obj;
- try {
- obj = resModel.lookupRoot();
- } catch (NotFoundException e) {
- return CommandResult.newErrorCommandResult(e);
- }
- if(obj instanceof Model) {
- Model model = (Model)obj;
- for(String uri : getRequiredProfiles()) {
- EPackage definition = EPackage.Registry.INSTANCE.getEPackage(uri);
- if(definition != null) {
- Profile profile = UMLUtil.getProfile(definition, model);
- model.applyProfile(profile);
- }
- }
- }
- return CommandResult.newOKCommandResult();
- }
- };
- commandProfiles.execute(new NullProgressMonitor(), null);
-
- } else {
- new CreateProfileModelCommand().createModel(this.diResourceSet);
- ServicesRegistry registry = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
- try {
- registry.add(ModelSet.class, Integer.MAX_VALUE, diResourceSet); // High priority to override all contributions
- registry.startRegistry();
- } catch (ServiceException ex) {
- // Ignore exceptions
- }
- }
- ICreationCommand command = getDiagramCommandCreation();
- command.createDiagram(diResourceSet, null, "DiagramToTest"); //$NON-NLS-1$
- diResourceSet.save(new NullProgressMonitor());
- }
-
- papyrusEditor = houseKeeper.openPapyrusEditor(file);
- Assert.assertNotNull("Failed to open the editor", papyrusEditor); //$NON-NLS-1$
- }
-
- /**
- * Call {@link AbstractPapyrusTestCase#execute(Command) execute} on the UI
- * thread.
- */
- protected void executeOnUIThread(final Command command) {
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- execute(command);
- }
- });
- }
-
- /** Call {@link AbstractPapyrusTestCase#undo() undo} on the UI thread. */
- protected void undoOnUIThread() {
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- undo();
- }
- });
- }
-
- /** Call {@link AbstractPapyrusTestCase#redo() redo} on the UI thread. */
- protected void redoOnUIThread() {
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- redo();
- }
- });
- }
-
- protected void assertLastOperationSuccessful() {
- Assert.assertFalse("The operation failed. Look at the log, or put a breakpoint on ExecutionException or DefaultOperationHistory#notifyNotOK to find the cause.", this.operationFailed); //$NON-NLS-1$
- }
-
- /**
- * Reset the "operation failed" state. Call this before executing each
- * operation for which you want to test whether if failed with {@link AbstractPapyrusTestCase#assertLastOperationSuccessful()}.
- */
- protected void resetLastOperationFailedState() {
- this.operationFailed = false;
- }
-
- /** Execute the given command in the diagram editor. */
- protected void execute(final Command command) {
- resetLastOperationFailedState();
- getCommandStack().execute(new GEFtoEMFCommandWrapper(command));
- assertLastOperationSuccessful();
- }
-
- /** Undo the last command done in the diagram editor. */
- protected void undo() {
- resetLastOperationFailedState();
- final CommandStack commandStack = getCommandStack();
- Assert.assertTrue("We should be able to undo", commandStack.canUndo()); //$NON-NLS-1$
- commandStack.undo();
- assertLastOperationSuccessful();
- }
-
- /** Redo the last command undone in the diagram editor. */
- protected void redo() {
- resetLastOperationFailedState();
- final CommandStack commandStack = getCommandStack();
- Assert.assertTrue("We should be able to redo", commandStack.canRedo()); //$NON-NLS-1$
- commandStack.redo();
- assertLastOperationSuccessful();
- }
-
- /** The command stack to use to execute commands on the diagram. */
- protected CommandStack getCommandStack() {
- // not "diagramEditor.getDiagramEditDomain().getDiagramCommandStack()"
- // because it messes up undo contexts
- return this.diagramEditor.getEditingDomain().getCommandStack();
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestMultiLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestMultiLink.java
deleted file mode 100644
index 406b56dde3a..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestMultiLink.java
+++ /dev/null
@@ -1,434 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests.canonical;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-
-import org.eclipse.draw2d.ConnectionAnchor;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.NodeEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Relationship;
-import org.junit.Before;
-
-/**
- * The Class MultiLink.
- */
-public abstract class AbstractTestMultiLink extends AbstractPapyrusTestCase {
-
- protected static final String THE_BRANCH_TO_RECONNECT_EXISTS = "the branch to reconnect exists"; //$NON-NLS-1$
-
- protected static final String BRANCH_EXISTS_RECONNECTION_ON_TARGET = "branch exists reconnection on target "; //$NON-NLS-1$
-
- protected static final String RECONNECTION_TARGET = "Reconnection target "; //$NON-NLS-1$
-
- protected static final String BRANCH_EXISTS_RECONNECTION_ON_SOURCE = "branch exists reconnection on Source "; //$NON-NLS-1$
-
- protected static final String RECONNECTION_SOURCE = "Reconnection Source "; //$NON-NLS-1$
-
- GraphicalEditPart source = null;
-
- GraphicalEditPart target = null;
-
- GraphicalEditPart thirdPlayer = null;
-
- GraphicalEditPart fourthPlayer = null;
-
- GraphicalEditPart guestPlayer = null;
-
- ConnectionEditPart binaryLink = null;
-
- ShapeNodeEditPart linkNode = null;
-
- /** The Constant CREATION. */
- protected static final String CREATION = "CREATION:"; //$NON-NLS-1$
-
- /** The Constant CONTAINER_CREATION. */
- protected static final String CONTAINER_CREATION = "CONTAINER CREATION: "; //$NON-NLS-1$
-
- /** The Constant DROP. */
- protected static final String DROP = "DROP: "; //$NON-NLS-1$
-
- /** The Constant DESTROY_DELETION. */
- protected static final String DESTROY_DELETION = "DESTROY DELETION: "; //$NON-NLS-1$
-
- /** The Constant COMMAND_NULL. */
- protected static final String COMMAND_NULL = " command null"; //$NON-NLS-1$
-
- /** The Constant VIEW_DELETION. */
- protected static final String VIEW_DELETION = "VIEW DELETION: "; //$NON-NLS-1$
-
- /** The Constant TEST_THE_REDO. */
- protected static final String TEST_THE_REDO = "test the redo"; //$NON-NLS-1$
-
- /** The Constant TEST_THE_UNDO. */
- protected static final String TEST_THE_UNDO = "test the undo"; //$NON-NLS-1$
-
- /** The Constant TEST_THE_EXECUTION. */
- protected static final String TEST_THE_EXECUTION = "test the execution"; //$NON-NLS-1$
-
- /** The Constant TEST_IF_THE_COMMAND_CAN_BE_EXECUTED. */
- protected static final String TEST_IF_THE_COMMAND_CAN_BE_EXECUTED = "test if the command can be executed"; //$NON-NLS-1$
-
- /** The Constant TEST_IF_THE_COMMAND_IS_CREATED. */
- protected static final String TEST_IF_THE_COMMAND_IS_CREATED = "test if the command is created"; //$NON-NLS-1$
-
- /** The Constant INITIALIZATION_TEST. */
- protected static final String INITIALIZATION_TEST = "Intitial State"; //$NON-NLS-1$
-
- /** The Constant CHANGE_CONTAINER. */
- protected static final String CHANGE_CONTAINER = "CHANGE CONTAINER"; //$NON-NLS-1$
-
- /** The root compartment. */
- protected ShapeCompartmentEditPart rootCompartment = null;
-
- /**
- * Test view deletion.
- *
- * @param type
- * the type
- */
- public void testViewDeletion(IElementType type) {
- //DELETION OF THE VIEW
- //DELETION OF ALL THE VIEW
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, linkNode != null);
- Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
- Command command = linkNode.getCommand(deleteViewRequest);
- assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 5);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 6);
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 4);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(VIEW_DELETION + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 5);
- assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
- }
-
- public static Point getIntersectionPoint(ConnectionEditPart connEP, boolean source) {
- ConnectionAnchor sourceAnchor;
- ConnectionAnchor targetAnchor;
- NodeEditPart sourceEP = (NodeEditPart)connEP.getSource();
- NodeEditPart targetEP = (NodeEditPart)connEP.getTarget();
- Point endLocation;
- sourceAnchor = sourceEP.getSourceConnectionAnchor(connEP);
- targetAnchor = targetEP.getTargetConnectionAnchor(connEP);
- if(source) {
- endLocation = sourceAnchor.getLocation(targetAnchor.getReferencePoint()).getCopy();
- } else {
- endLocation = targetAnchor.getLocation(sourceAnchor.getReferencePoint()).getCopy();
- }
- return endLocation;
- }
-
- /**
- * Test destroy.
- *
- * @param type
- * the type
- */
- public void testDestroy(IElementType type) {
- //DESTROY SEMANTIC+ VIEW
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 6);
- Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
- Command command = linkNode.getCommand(deleteViewRequest);
- assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 5);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 6);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 4);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 5);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
- }
-
- /**
- * Test drop.
- *
- * @param type
- * the type
- */
- public void testDrop(IElementType type) {
- //DROP
- //INIT
- assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 5);
- assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
- assertTrue(DROP + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
- assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().get(5) instanceof Relationship);
- Relationship relationship = (Relationship)getRootSemanticModel().getOwnedElements().get(5);
- //DO
- DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
- ArrayList<Element> list = new ArrayList<Element>();
- list.add(relationship);
- dropObjectsRequest.setObjects(list);
- dropObjectsRequest.setLocation(new Point(20, 20));
- Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
- assertNotNull(DROP + COMMAND_NULL, command);
- assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 6);
- assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 4);
- //UNDO
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 5);
- assertTrue(DROP + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 0);
- //REDO
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 6);
- assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
- assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 4);
- }
-
- /**
- * Test to create a node.
- *
- * @param branchType
- * type of the branch to create
- * @param flow
- * TODO
- *
- */
- public void testToCreateAMultiLink(IElementType branchType, boolean flow) {
- //test to create the branch for dependency to node
- Command cmd = target.getCommand(createConnectionViewRequest(branchType, binaryLink, thirdPlayer));
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
- // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
- assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 3);
- assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
- //Undo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 6);
- //redo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 3);
- assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
- assertTrue(CREATION + TEST_THE_REDO, getDiagramEditPart().getChildren().get(5) != null);
- linkNode = (ShapeNodeEditPart)getDiagramEditPart().getChildren().get(5);
- //test to create the branch from node to multidependency
- if(flow) {
- cmd = linkNode.getCommand(createConnectionViewRequest(branchType, fourthPlayer, linkNode));
- } else {//test to create the branch from multidependency to node
- cmd = linkNode.getCommand(createConnectionViewRequest(branchType, linkNode, fourthPlayer));
- }
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
- assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 4);
- assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
- //undo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 3);
- assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 6);
- //redo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 4);
- assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
- }
-
- public void testTargetReconnectAMultiLink(IElementType type) {
- //target reconnection
- ReconnectRequest reconnectRequest = new ReconnectRequest();
- assertTrue(THE_BRANCH_TO_RECONNECT_EXISTS, (ConnectionEditPart)target.getTargetConnections().get(0) != null);
- ConnectionEditPart branch = (ConnectionEditPart)target.getTargetConnections().get(0);
- reconnectRequest.setConnectionEditPart(branch);
- reconnectRequest.setTargetEditPart(guestPlayer);
- reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
- Command cmd = guestPlayer.getCommand(reconnectRequest);
- assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
- // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
- assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 4);
- assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
- assertTrue(BRANCH_EXISTS_RECONNECTION_ON_TARGET, branch.getTarget().equals(guestPlayer));
- //undo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(BRANCH_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, branch.getTarget().equals(target));
- //redo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(BRANCH_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, branch.getTarget().equals(guestPlayer));
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
- }
-
- public void testSourceReconnectAMultiLink(IElementType type) {
- //target reconnection
- ReconnectRequest reconnectRequest = new ReconnectRequest();
- assertTrue(THE_BRANCH_TO_RECONNECT_EXISTS, (ConnectionEditPart)source.getSourceConnections().get(0) != null);
- ConnectionEditPart branch = (ConnectionEditPart)source.getSourceConnections().get(0);
- reconnectRequest.setConnectionEditPart(branch);
- reconnectRequest.setTargetEditPart(guestPlayer);
- reconnectRequest.setType(RequestConstants.REQ_RECONNECT_SOURCE);
- Command cmd = guestPlayer.getCommand(reconnectRequest);
- assertTrue(RECONNECTION_SOURCE + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
- assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 4);
- assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
- assertTrue(BRANCH_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_EXECUTION, branch.getSource().equals(guestPlayer));
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(BRANCH_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_UNDO, branch.getSource().equals(source));
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(BRANCH_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_REDO, branch.getSource().equals(guestPlayer));
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
- }
-
- public CreateConnectionViewRequest createConnectionViewRequest(IElementType type, EditPart source, EditPart target) {
- CreateConnectionViewRequest connectionRequest = CreateViewRequestFactory.getCreateConnectionRequest(type, ((IGraphicalEditPart)getDiagramEditPart()).getDiagramPreferencesHint());
- connectionRequest.setSourceEditPart(null);
- connectionRequest.setTargetEditPart(source);
- connectionRequest.setType(RequestConstants.REQ_CONNECTION_START);
- source.getCommand(connectionRequest);
- // Now, setup the request in preparation to get the
- // connection end
- // command.
- connectionRequest.setSourceEditPart(source);
- connectionRequest.setTargetEditPart(target);
- connectionRequest.setType(RequestConstants.REQ_CONNECTION_END);
- return connectionRequest;
- }
-
- protected abstract CreateViewRequest createViewRequestShapeContainer();
-
- /**
- * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp()
- *
- * @throws Exception
- */
- @Before
- @Override
- public void setUp() throws Exception {
- super.setUp();
- CreateViewRequest requestcreation = createViewRequestShapeContainer();
- //1st node
- requestcreation.setLocation(new Point(10, 10));
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 1);
- requestcreation.setLocation(new Point(400, 10));
- //2d node
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 2);
- requestcreation.setLocation(new Point(200, 200));
- //3d node
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 3);
- source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
- target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
- thirdPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
- //4d node
- requestcreation.setLocation(new Point(400, 400));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- fourthPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
- //4d guest
- requestcreation.setLocation(new Point(600, 400));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 5);
- guestPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(4);
- }
-
- public void installbinaryLink(IElementType type) {
- //binaryLink
- Command command = target.getCommand(createConnectionViewRequest(type, source, target));
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
- binaryLink = (ConnectionEditPart)source.getSourceConnections().get(0);
- }
-
- /**
- * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView()
- *
- * @return
- */
- @Override
- protected View getRootView() {
- return (View)getDiagramEditPart().getModel();
- }
-
- /**
- * Test to manage child node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToManageMultiLink(IElementType binaryLinkType, IElementType branchType, boolean flow) {
- installbinaryLink(binaryLinkType);
- testToCreateAMultiLink(branchType, flow);
- testTargetReconnectAMultiLink(branchType);
- if(flow) {
- testSourceReconnectAMultiLink(branchType);
- }
- testDestroy(branchType);
- //end of the test
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, getDiagramEditPart().getChildren().get(5) instanceof ShapeNodeEditPart);
- linkNode = (ShapeNodeEditPart)getDiagramEditPart().getChildren().get(5);
- testViewDeletion(branchType);
- testDrop(branchType);
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestNode.java
deleted file mode 100644
index d23ab380455..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestNode.java
+++ /dev/null
@@ -1,571 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- * Christian W. Damus (CEA) - bug 431618
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests.canonical;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.uml2.uml.Element;
-import org.junit.Assert;
-import org.junit.Before;
-
-/**
- * Abstract class to test nodes
- */
-public abstract class AbstractTestNode extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
-
- /** <code>true</code> if semantic tests should be run on graphical manipulation */
- private boolean testSemantic;
-
- /** command computed on the ui thread */
- protected Command command;
-
- /**
- * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp()
- *
- * @throws Exception
- */
- @Before
- @Override
- public void setUp() throws Exception {
- super.setUp();
- testSemantic = isSemanticTest();
- }
-
- /**
- * Returns <code>true</code> if semantic tests should be also performed
- *
- * @return <code>true</code> if semantic tests should be also performed
- */
- protected boolean isSemanticTest() {
- return false;
- }
-
- /**
- * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView()
- *
- * @return
- */
- @Override
- protected abstract View getRootView();
-
- public abstract DiagramUpdater getDiagramUpdater();
-
- /**
- * Returns the container edit part
- */
- protected abstract IGraphicalEditPart getContainerEditPart();
-
-
-
- /**
- * Test to manage child node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToManageNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, String initialName,int numberSemanticChildreen) {
- // create a node
- testToCreateANode(type, 0, 0, 1, 1, false, initialName, numberSemanticChildreen);
- // creates a second one
- testToCreateANode(type, 1, 1, 1, 1, false, initialName, numberSemanticChildreen);
- // destroy the first element
- testDestroy(type, 2, 2, 1, 1);
- // destroy the second one
- testDestroy(type, 1, 1, 1, 1);
- // the node has been destroyed, the UML element also. restore one element
- undoOnUIThread();
- // the node and the UML element are present
- testViewDeletion(type,1, 1, 1);
- // The node has been deleted, the uml element is still present
- testDrop(type, eClass,0,1,1);
-
- // The element can be dropped several time in the diagrams
- testDrop(type, eClass,1,1,1);
-
- // undo the second drop
- undoOnUIThread();
- // the node and element are present
- if(containerMove) {
- testChangeContainer(type, containerType);
- }
- }
-
- /**
- * Test to manage child node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToManageNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, int numberSemanticChildreen) {
- testToManageNode(type, eClass, containerType, containerMove, null, numberSemanticChildreen);
- }
-
- /**
- * Test to manage child node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToManageNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove) {
- testToManageNode(type, eClass, containerType, containerMove, null, 0);
- }
- /**
- * Test to manage child node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToManageNodeWithMask(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, String initialName,int numberSemanticChildreen) {
- // create a node
- testToCreateANode(type, 0, 0, 1, 1, true, initialName, numberSemanticChildreen);
- // creates a second one
- testToCreateANode(type, 1, 1, 1, 1, true, initialName, numberSemanticChildreen);
- // destroy the first element
- testDestroy(type, 2, 2, 1, 1);
- // destroy the second one
- testDestroy(type, 1, 1, 1, 1);
- // the node has been destroyed, the UML element also. restore one element
- undoOnUIThread();
- // the node and the UML element are present
- testViewDeletion(type,1, 1, 1);
- // The node has been deleted, the uml element is still present
- testDrop(type, eClass,0,1,1);
-
- // The element can be dropped several time in the diagrams
- testDrop(type, eClass,1,1,1);
- // the node and element are present
- if(containerMove) {
- testChangeContainer(type, containerType);
- }
- }
-
- /**
- * Test to manage child node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToManageNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, EReference containmentFeature, boolean maskmanaged, int numberSemanticChildreen) {
- // create a node
- testToCreateANode(type);
- // creates a second one
- testToCreateANode(type, 1, 1, 1, 1, maskmanaged,null, numberSemanticChildreen);
- // destroy the first element
- testDestroy(type, 2, 2, 1, 1);
- // destroy the second one
- testDestroy(type, 1, 1, 1, 1);
- // the node has been destroyed, the UML element also. restore one element
- undoOnUIThread();
- // the node and the UML element are present
- testViewDeletion(type,1, 1, 1);
- // The node has been deleted, the uml element is still present
- testDrop(type, eClass,0,1,1);
- // the node and element are present
- if(containerMove) {
- testChangeContainer(type, containerType);
- }
- }
-
- /**
- * Test to manage child node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- * @deprecated, @use {@link AbstractTestNode#testToManageNode(IElementType, EClass, IElementType, boolean)}
- */
- @Deprecated
- public void testToManageChildNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, boolean maskmanaged,int numberSemanticChildreen) {
- testToManageNode(type, eClass, containerType, containerMove,null, numberSemanticChildreen);
- }
-
- /**
- * Test destroy.
- *
- * @param type
- * the type
- */
- public void testDestroy(IElementType type) {
- testDestroy(type, 1, 1, 1, 1);
- }
-
- /**
- * Test destroy.
- *
- * @param type
- * the type
- */
- public void testDestroy(IElementType type, int expectedGraphicalChildren, int expectedSemanticChildren, int removedGraphicalChildren, int removedSemanticChildren) {
- // DESTROY SEMANTIC + VIEW
- assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedGraphicalChildren, getRootView().getChildren().size());
- if(testSemantic) {
- assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
- }
- Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
- EditPart currentEditPart= ((GraphicalEditPart)getContainerEditPart().getChildren().get(getContainerEditPart().getChildren().size()-1));
- Command command = currentEditPart.getCommand(deleteViewRequest);
- assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
- testEnableForDeleteFromModel();
- executeOnUIThread(command);
- assertEquals(DESTROY_DELETION + TEST_THE_EXECUTION, expectedGraphicalChildren - removedGraphicalChildren,getRootView().getChildren().size());
- if(testSemantic) {
- assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedSemanticChildren - removedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
- }
- undoOnUIThread();
- assertEquals(DESTROY_DELETION + TEST_THE_UNDO, expectedGraphicalChildren,getRootView().getChildren().size());
- if(testSemantic) {
- assertEquals(DESTROY_DELETION + TEST_THE_UNDO, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
- }
- redoOnUIThread();
- assertEquals(DESTROY_DELETION + TEST_THE_REDO, expectedGraphicalChildren - removedGraphicalChildren,getRootView().getChildren().size());
- if(testSemantic) {
- assertEquals(DESTROY_DELETION + TEST_THE_REDO, expectedSemanticChildren - removedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
- }
- }
-
- /**
- * test id the handler delete from model is enable
- */
- protected void testEnableForDeleteFromModel() {
- ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
- org.eclipse.core.commands.Command cmd = commandService.getCommand("org.eclipse.ui.edit.delete"); //$NON-NLS-1$
- IHandler handler = cmd.getHandler();
- if(handler instanceof AbstractHandler) {
- ((AbstractHandler)handler).setEnabled("org.eclipse.ui.edit.delete"); //$NON-NLS-1$
- }
- boolean res = handler.isEnabled();
- assertTrue("Delete from model handler must be enable",res); //$NON-NLS-1$
- }
-
- /**
- * Test drop.
- *
- * @param type
- * the type
- */
- public void testDrop(IElementType type, EClass eClass, int expectedGraphicalChildren, int expectedSemanticChildren, int addedGraphicalChildren) {
- //DROP
- assertEquals(DROP + INITIALIZATION_TEST, expectedGraphicalChildren,getRootView().getChildren().size());
- if(testSemantic) {
- assertEquals(DROP + INITIALIZATION_TEST, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
- }
- DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
- ArrayList<Element> list = new ArrayList<Element>();
- for(Element element : getRootSemanticModel().getOwnedElements()) {
- if(element != null && element.eClass().equals(eClass)) {
- list.add(element);
- }
- }
- dropObjectsRequest.setObjects(list);
- dropObjectsRequest.setLocation(new Point(40, 40));
- Command command = getContainerEditPart().getCommand(dropObjectsRequest);
- assertNotNull(DROP + COMMAND_NULL, command);
- assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
- // execute the drop
- executeOnUIThread(command);
- Assert.assertEquals(DROP + TEST_THE_EXECUTION,expectedGraphicalChildren+addedGraphicalChildren,getRootView().getChildren().size());
- if(testSemantic) {
- Assert.assertEquals(DROP + TEST_THE_EXECUTION,expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
- }
- // undo the drop
- undoOnUIThread();
- Assert.assertEquals(DROP + TEST_THE_UNDO, expectedGraphicalChildren, getRootView().getChildren().size());
- if(testSemantic) {
- Assert.assertEquals(DROP + TEST_THE_UNDO, expectedSemanticChildren,getRootSemanticModel().getOwnedElements().size());
- }
- // redo the drop
- redoOnUIThread();
- Assert.assertEquals(DROP + TEST_THE_REDO,expectedGraphicalChildren+addedGraphicalChildren,getRootView().getChildren().size());
- if(testSemantic) {
- assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() != 0);
- }
- }
-
- /**
- * Test change container.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testChangeContainer(IElementType type, IElementType containerType) {
- //CHANGE CONTAINER
- assertEquals(CHANGE_CONTAINER + INITIALIZATION_TEST, 1, getContainerEditPart().getChildren().size());
- assertEquals(CHANGE_CONTAINER + INITIALIZATION_TEST, 1, getRootSemanticModel().getOwnedElements().size());
- final Request requestcreation = CreateViewRequestFactory.getCreateShapeRequest(containerType, getContainerEditPart().getDiagramPreferencesHint());
- command = null;
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- command = getContainerEditPart().getCommand(requestcreation);
- }
- });
- assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
- executeOnUIThread(command);
- assertEquals(CONTAINER_CREATION + TEST_THE_EXECUTION, 2, getRootView().getChildren().size());
- GraphicalEditPart containerEditPart = (GraphicalEditPart)getContainerEditPart().getChildren().get(1);
- ChangeBoundsRequest changeBoundsRequest = new ChangeBoundsRequest(RequestConstants.REQ_ADD);
- changeBoundsRequest.setEditParts((EditPart)getContainerEditPart().getChildren().get(0));
- changeBoundsRequest.setLocation(new Point(30, 30));
- ShapeCompartmentEditPart compartment = null;
- int index = 0;
- while(compartment == null && index < containerEditPart.getChildren().size()) {
- if((containerEditPart.getChildren().get(index)) instanceof ShapeCompartmentEditPart) {
- compartment = (ShapeCompartmentEditPart)(containerEditPart.getChildren().get(index));
- }
- index++;
- }
- assertTrue("Container not found", compartment != null); //$NON-NLS-1$
- command = compartment.getCommand(changeBoundsRequest);
- assertNotNull(CHANGE_CONTAINER, command);
- assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
- // execute change container
- executeOnUIThread(command);
- assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 1, getRootView().getChildren().size());
- assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 1, getRootSemanticModel().getOwnedElements().size());
- assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 1, compartment.getChildren().size());
- // undo change container
- undoOnUIThread();
- assertEquals(CHANGE_CONTAINER + TEST_THE_UNDO, 2, getRootView().getChildren().size());
- assertEquals(CHANGE_CONTAINER + TEST_THE_UNDO, 2, getRootSemanticModel().getOwnedElements().size());
- assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 0, compartment.getChildren().size());
- // redo change container
- redoOnUIThread();
- assertEquals(CHANGE_CONTAINER + TEST_THE_REDO, 1, getRootView().getChildren().size());
- assertEquals(CHANGE_CONTAINER + TEST_THE_REDO, 1, getRootSemanticModel().getOwnedElements().size());
- assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 1, compartment.getChildren().size());
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type, int expectedGraphicalChildren, int expectedSemanticChildren, int addedGraphicalChildren, int addedSemanticChildren, boolean maskmanaged, String initialName, int numberSemanticChildreen) {
- command = null;
- //CREATION
- assertEquals(CREATION + INITIALIZATION_TEST, expectedGraphicalChildren, getRootView().getChildren().size());
- Element root = getRootSemanticModel();
- List<Element> ownedElements = root.getOwnedElements();
- if( isSemanticTest()){
- assertEquals(CREATION + INITIALIZATION_TEST, expectedSemanticChildren, ownedElements.size());
- }
- final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getContainerEditPart().getDiagramPreferencesHint());
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- command = getContainerEditPart().getCommand(requestcreation);
- }
- });
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute()); //$NON-NLS-1$
- // execute the creation
- executeOnUIThread(command);
- assertEquals(CREATION + TEST_THE_EXECUTION, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size());
- if(addedGraphicalChildren>=1){
- Assert.assertTrue("Node must be org.eclipse.gmf.runtime.notation.Shape",getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren-1) instanceof Shape); //$NON-NLS-1$
- }
-
- if(testSemantic) {
- assertEquals(CREATION + TEST_THE_EXECUTION, expectedSemanticChildren + addedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
- }
- // undo the creation
- undoOnUIThread();
- assertEquals(CREATION + TEST_THE_UNDO, expectedGraphicalChildren, getRootView().getChildren().size());
- if(testSemantic) {
- assertEquals(CREATION + TEST_THE_UNDO, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
- }
- // redo the creation test
- redoOnUIThread();
- assertEquals(CREATION + TEST_THE_REDO, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size());
- if(testSemantic) {
- assertEquals(CREATION + TEST_THE_REDO, expectedSemanticChildren + addedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
- }
-
- EditPart createdEditPart= (EditPart)getContainerEditPart().getChildren().get((getContainerEditPart().getChildren().size()-1));
- Assert.assertNotNull("The editpart must be created", createdEditPart); //$NON-NLS-1$
- testNodeEditPart(maskmanaged, createdEditPart, initialName);
-
-
- // test diagram updater
- if(getDiagramUpdater()!=null){
- Assert.assertNotEquals("Diagram updater must detect that children has been created",0,getDiagramUpdater().getSemanticChildren(getRootView()).size()); //$NON-NLS-1$
- Assert.assertEquals("Diagram updater must detect that no link has been created",0,getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no link are incoming",0,getDiagramUpdater().getIncomingLinks((View)getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren-1)).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no link are outgoing",0,getDiagramUpdater().getOutgoingLinks((View)getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren-1)).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no children has ben created in the new element",numberSemanticChildreen,getDiagramUpdater().getSemanticChildren((View)getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren-1)).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no link has been created in the new element",0,getDiagramUpdater().getContainedLinks((View)getRootView().getChildren().get(expectedGraphicalChildren + addedGraphicalChildren-1)).size()); //$NON-NLS-1$
- }
- createdEditPart.getChildren();
- for(Iterator<?> iteratorEditPart = createdEditPart.getChildren().iterator(); iteratorEditPart.hasNext();) {
- Object subEditPart = iteratorEditPart.next();
- if( subEditPart instanceof UMLCompartmentEditPart){
- Assert.assertEquals("Diagram updater must detect that children has been created",0,getDiagramUpdater().getSemanticChildren(((CompartmentEditPart)subEditPart).getNotationView()).size()); //$NON-NLS-1$
- }
-
- }
- }
-
- /**
- * this method is used to test the created editpart
- * @param maskmanaged
- * @param createdEditPart
- */
- protected void testNodeEditPart(boolean maskmanaged, EditPart createdEditPart,String initialName) {
- if( maskmanaged){
- Assert.assertNotNull("the created editpolicy must have as MASK_MANAGED_LABEL_EDIT_POLICY", createdEditPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY)); //$NON-NLS-1$
- }
- int index=0;
- while(index < createdEditPart.getChildren().size()) {
- if((createdEditPart.getChildren().get(index)) instanceof ResizableCompartmentEditPart ) {
- ResizableCompartmentEditPart compartment = (ResizableCompartmentEditPart)(createdEditPart.getChildren().get(index));
- Assert.assertFalse("compartment must not be selectable",compartment.isSelectable()); //$NON-NLS-1$
- }
- index++;
- }
- testNameLabel(createdEditPart, initialName);
- }
-
- protected void testNameLabel(EditPart createdEditPart, String initialName) {
- if( createdEditPart instanceof NamedElementEditPart){
- GraphicalEditPart namedEditPart=(GraphicalEditPart)((NamedElementEditPart)createdEditPart).getPrimaryChildEditPart();
- Assert.assertTrue("the primary editpart must be the namelabelEditpart",namedEditPart instanceof ITextAwareEditPart); //$NON-NLS-1$
- String name=namedEditPart.resolveSemanticElement().eClass().getName();
- if( initialName!=null){
- name=initialName;
- }
- if(name.length()<((ITextAwareEditPart)namedEditPart).getEditText().length()){
- Assert.assertEquals(" the name must contain the name of the metaclass",name, ((ITextAwareEditPart)namedEditPart).getEditText().substring(0,name.length())); //$NON-NLS-1$
- }
- else{
- //not the same it sure but display the mistake is important
- Assert.assertEquals(" the name must contain the name of the metaclass",name, ((ITextAwareEditPart)namedEditPart).getEditText()); //$NON-NLS-1$
- }
- if(namedEditPart instanceof CompartmentEditPart ){
- Assert.assertTrue("the primary editpart must be the namelabelEditpart",namedEditPart instanceof CompartmentEditPart); //$NON-NLS-1$
- Assert.assertTrue("namelabelEditpart must be editable",((CompartmentEditPart)namedEditPart).isEditModeEnabled());} //$NON-NLS-1$
- else{
- Assert.assertTrue("the primary editpart must be the namelabelEditpart",namedEditPart instanceof LabelEditPart); //$NON-NLS-1$
-
- }
- }
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type) {
- testToCreateANode(type, 0, getRequiredProfiles().length, 1, 1, false,null,0);
- }
-
- /**
- * Test view deletion.
- *
- * @param type
- * the type
- */
- public void testViewDeletion(IElementType type, int expectedGraphicalChildren, int expectedSemanticChildren, int removedGraphicalChildren) {
- //DELETION OF THE VIEW
- assertEquals(VIEW_DELETION + INITIALIZATION_TEST, expectedGraphicalChildren, getRootView().getChildren().size());
-
- Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
- Command command = ((IGraphicalEditPart)getContainerEditPart().getChildren().get(getContainerEditPart().getChildren().size()-1)).getCommand(deleteViewRequest);
- assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
- // execute hide the view
- executeOnUIThread(command);
- assertEquals(VIEW_DELETION + TEST_THE_EXECUTION, expectedGraphicalChildren-removedGraphicalChildren, getRootView().getChildren().size());
- if(testSemantic) {
- Assert.assertEquals(VIEW_DELETION + TEST_THE_EXECUTION,expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size() );
- }
- // undo hide the view
- undoOnUIThread();
- assertEquals(VIEW_DELETION + TEST_THE_UNDO, expectedGraphicalChildren,getRootView().getChildren().size());
- if(testSemantic) {
- Assert.assertEquals(VIEW_DELETION + TEST_THE_EXECUTION,expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size() );
- }
- // redo hide the view
- redoOnUIThread();
- assertEquals(VIEW_DELETION + TEST_THE_REDO, expectedGraphicalChildren-removedGraphicalChildren, getRootView().getChildren().size());
- if(testSemantic) {
- Assert.assertEquals(VIEW_DELETION + TEST_THE_EXECUTION,expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size() );
- }
- }
-
- protected abstract CreateViewRequest createViewRequestShapeContainer();
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildLabel.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildLabel.java
deleted file mode 100644
index 0e1309342b7..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildLabel.java
+++ /dev/null
@@ -1,440 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests.canonical;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.uml2.uml.Element;
-import org.junit.Assert;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class TestChildLabel.
- */
-public abstract class TestChildLabel extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
-
- /** The Constant CREATION. */
- protected static final String CREATION = "CREATION:"; //$NON-NLS-1$
-
- /** The Constant CONTAINER_CREATION. */
- protected static final String CONTAINER_CREATION = "CONTAINER CREATION: "; //$NON-NLS-1$
-
- /** The Constant DROP. */
- protected static final String DROP = "DROP: "; //$NON-NLS-1$
-
- /** The Constant DESTROY_DELETION. */
- protected static final String DESTROY_DELETION = "DESTROY DELETION: "; //$NON-NLS-1$
-
- /** The Constant COMMAND_NULL. */
- protected static final String COMMAND_NULL = " command null"; //$NON-NLS-1$
-
- /** The Constant VIEW_DELETION. */
- protected static final String VIEW_DELETION = "VIEW DELETION: "; //$NON-NLS-1$
-
- /** The Constant TEST_THE_REDO. */
- protected static final String TEST_THE_REDO = "test the redo"; //$NON-NLS-1$
-
- /** The Constant TEST_THE_UNDO. */
- protected static final String TEST_THE_UNDO = "test the undo"; //$NON-NLS-1$
-
- /** The Constant TEST_THE_EXECUTION. */
- protected static final String TEST_THE_EXECUTION = "test the execution"; //$NON-NLS-1$
-
- /** The Constant TEST_IF_THE_COMMAND_CAN_BE_EXECUTED. */
- protected static final String TEST_IF_THE_COMMAND_CAN_BE_EXECUTED = "test if the command can be executed"; //$NON-NLS-1$
-
- /** The Constant TEST_IF_THE_COMMAND_IS_CREATED. */
- protected static final String TEST_IF_THE_COMMAND_IS_CREATED = "test if the command is created"; //$NON-NLS-1$
-
- /** The Constant INITIALIZATION_TEST. */
- protected static final String INITIALIZATION_TEST = "Intitial State"; //$NON-NLS-1$
-
- /** The Constant CHANGE_CONTAINER. */
- protected static final String CHANGE_CONTAINER = "CHANGE CONTAINER"; //$NON-NLS-1$
-
- /** The top node. */
- protected GraphicalEditPart topNode;
-
- public abstract DiagramUpdater getDiagramUpdater();
-
- /**
- * Test view deletion.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testViewDeletion(IElementType type, int containerType) {
- ListCompartmentEditPart compartment = null;
- int index = 0;
- while(compartment == null && index < getTopEditPart().getChildren().size()) {
- if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) { //$NON-NLS-1$
- compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
- }
- index++;
- }
- assertTrue("Container not found", compartment != null); //$NON-NLS-1$
- //DELETION OF THE VIEW
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, compartment.getChildren().size() == 1);
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
- Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
- Command command = ((GraphicalEditPart)compartment.getChildren().get(0)).getCommand(deleteViewRequest);
- assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, compartment.getChildren().size() == 0);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, compartment.getChildren().size() == 1);
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(VIEW_DELETION + TEST_THE_REDO, compartment.getChildren().size() == 0);
- assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
- }
-
- /**
- * Test destroy.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testDestroy(IElementType type, int containerType) {
- ListCompartmentEditPart compartment = null;
- int index = 0;
- while(compartment == null && index < getTopEditPart().getChildren().size()) {
- if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) { //$NON-NLS-1$
- compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
- }
- index++;
- }
- assertTrue("Container not found", compartment != null); //$NON-NLS-1$
- //DESTROY SEMANTIC+ VIEW
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, compartment.getChildren().size() == 1);
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
- Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
- Command command = ((GraphicalEditPart)compartment.getChildren().get(0)).getCommand(deleteViewRequest);
- assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, compartment.getChildren().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- //assertTrue(DESTROY_DELETION +TEST_THE_UNDO,compartment.getChildren().size()==1);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, compartment.getChildren().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
- }
-
- /**
- * Test drop.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testDrop(IElementType type, int containerType) {
- ListCompartmentEditPart compartment = null;
- int index = 0;
- while(compartment == null && index < getTopEditPart().getChildren().size()) {
- if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) { //$NON-NLS-1$
- compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
- }
- index++;
- }
- assertTrue("Container not found", compartment != null); //$NON-NLS-1$
- //DROP
- assertTrue(DROP + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
- assertTrue(DROP + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
- DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
- ArrayList<Element> list = new ArrayList<Element>();
- list.add(getRootSemanticModel().getOwnedElements().get(0));
- dropObjectsRequest.setObjects(list);
- dropObjectsRequest.setLocation(new Point(20, 20));
- Command command = compartment.getCommand(dropObjectsRequest);
- assertNotNull(DROP + COMMAND_NULL, command);
- assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DROP + TEST_THE_EXECUTION, compartment.getChildren().size() != 0);
- assertTrue(DROP + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() != 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DROP + TEST_THE_UNDO, compartment.getChildren().size() == 0);
- assertTrue(DROP + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() != 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DROP + TEST_THE_REDO, compartment.getChildren().size() != 0);
- assertTrue(DROP + TEST_THE_REDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() != 0);
- }
-
- /**
- * Test change container.
- *
- * @param topNodeType
- * the top node type
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testChangeContainer(IElementType topNodeType, IElementType type, int containerType) {
- ListCompartmentEditPart compartment = null;
- int index = 0;
- while(compartment == null && index < getTopEditPart().getChildren().size()) {
- if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) { //$NON-NLS-1$
- compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
- }
- index++;
- }
- assertTrue("Container not found", compartment != null); //$NON-NLS-1$
- //CHANGE CONTAINER
- assertTrue(CHANGE_CONTAINER + INITIALIZATION_TEST, compartment.getChildren().size() == 1);
- assertTrue(CHANGE_CONTAINER + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
- Request requestcreation = CreateViewRequestFactory.getCreateShapeRequest(topNodeType, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CONTAINER_CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 2);
- GraphicalEditPart newContainerEditPart = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
- ChangeBoundsRequest changeBoundsRequest = new ChangeBoundsRequest(RequestConstants.REQ_ADD);
- changeBoundsRequest.setEditParts((EditPart)compartment.getChildren().get(0));
- changeBoundsRequest.setLocation(new Point(30, 30));
- ListCompartmentEditPart newCompartment = null;
- index = 0;
- while(newCompartment == null && index < newContainerEditPart.getChildren().size()) {
- if((newContainerEditPart.getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) { //$NON-NLS-1$
- newCompartment = (ListCompartmentEditPart)(newContainerEditPart.getChildren().get(index));
- }
- index++;
- }
- assertTrue("NewContainer not found", newCompartment != null); //$NON-NLS-1$
- command = newCompartment.getCommand(changeBoundsRequest);
- assertNotNull(CHANGE_CONTAINER, command);
- assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, compartment.getChildren().size() == 0);
- assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
- assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, newCompartment.getChildren().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CHANGE_CONTAINER + TEST_THE_UNDO, compartment.getChildren().size() == 1);
- assertTrue(CHANGE_CONTAINER + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
- assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, newCompartment.getChildren().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CHANGE_CONTAINER + TEST_THE_REDO, compartment.getChildren().size() == 0);
- assertTrue(CHANGE_CONTAINER + TEST_THE_REDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
- assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, newCompartment.getChildren().size() == 1);
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- * @param maskmanaged used to test if the editpart must have a mask managed edit policy
- */
- public void testToCreateANode(IElementType type, int containerType, boolean maskmanaged, String initialName) {
- ListCompartmentEditPart compartment = null;
- int index = 0;
- while(compartment == null && index < getTopEditPart().getChildren().size()) {
- if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) { //$NON-NLS-1$
- compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
- }
- index++;
- }
- assertTrue("Container not found", compartment != null); //$NON-NLS-1$
- //CREATION
- assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = compartment.getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
- Assert.assertTrue("Node must be org.eclipse.gmf.runtime.notation.Shape",((EditPart)compartment.getChildren().get(0)).getModel() instanceof Shape); //$NON-NLS-1$
- EditPart createdEditPart= (EditPart)compartment.getChildren().get(0);
- testNodeEditPart(maskmanaged, createdEditPart, initialName);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, compartment.getChildren().size() == 0);
- assertTrue(CREATION + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue("CREATION: " + TEST_THE_REDO, compartment.getChildren().size() == 1); //$NON-NLS-1$
-
- Assert.assertNotEquals("Diagram updater must detect that children has been created",0,getDiagramUpdater().getSemanticChildren(getRootView()).size()); //$NON-NLS-1$
- Assert.assertEquals("Diagram updater must detect that no link has been created",0,getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no link are incoming",0,getDiagramUpdater().getIncomingLinks(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no link are outgoing",0,getDiagramUpdater().getOutgoingLinks(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no children has ben created in the new element",0,getDiagramUpdater().getSemanticChildren(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no link has been created in the new element",0,getDiagramUpdater().getContainedLinks(((GraphicalEditPart) compartment.getChildren().get(0)).getNotationView()).size()); //$NON-NLS-1$
-
-
-
- }
- /**
- * this method is used to test the created editpart
- * @param maskmanaged
- * @param createdEditPart
- */
- protected void testNodeEditPart(boolean maskmanaged, EditPart createdEditPart, String initialName) {
- Assert.assertNotNull("The editpart must be created", createdEditPart); //$NON-NLS-1$
- if( maskmanaged){
- Assert.assertNotNull("the created editpolicy must have as MASK_MANAGED_LABEL_EDIT_POLICY", createdEditPart.getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY)); //$NON-NLS-1$
- }
- Assert.assertTrue("the primary editpart must be the namelabelEditpart",createdEditPart instanceof ITextAwareEditPart); //$NON-NLS-1$
- Assert.assertTrue("the primary editpart must be the namelabelEditpart",createdEditPart instanceof GraphicalEditPart); //$NON-NLS-1$
- String name=((GraphicalEditPart)createdEditPart).resolveSemanticElement().eClass().getName();
- if(initialName!=null){
- name= initialName;
- }
- if(name.length()<((ITextAwareEditPart)createdEditPart).getEditText().length()){
- Assert.assertEquals(" the name must contain the name of the metaclass",name, ((ITextAwareEditPart)createdEditPart).getEditText().substring(0,name.length())); //$NON-NLS-1$
- }
- else{
- //not the same it sure but display the mistake is important
- Assert.assertEquals(" the name must contain the name of the metaclass",name, ((ITextAwareEditPart)createdEditPart).getEditText()); //$NON-NLS-1$
- }
- Assert.assertTrue("the primary editpart must be the namelabelEditpart",createdEditPart instanceof CompartmentEditPart); //$NON-NLS-1$
- Assert.assertTrue("namelabelEditpart must be editable",((CompartmentEditPart)createdEditPart).isEditModeEnabled()); //$NON-NLS-1$
- }
-
- /**
- * Test to create a top node.
- *
- * @param type
- * the type
- */
- public void testToCreateATopNode(IElementType type) {
- //CREATION
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Element)((View)getDiagramEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
- topNode = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
- }
-
- /**
- * Gets the top edit part.
- *
- * @return the top edit part
- */
- public GraphicalEditPart getTopEditPart() {
- return topNode;
- }
-
- /**
- * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootSemanticModel()
- *
- * @return
- */
- @Override
- protected Element getRootSemanticModel() {
- // TODO Auto-generated method stub
- return (Element)((View)getTopEditPart().getModel()).getElement();
- }
-
- /**
- * Test to manage top node.
- *
- * @param topNodeType
- * the top node type
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToManageTopNode(IElementType topNodeType, IElementType type, int containerType,String initialName) {
- testToCreateATopNode(topNodeType);
- testToCreateANode(type, containerType, false, initialName);
- testDestroy(type, containerType);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- testViewDeletion(type, containerType);
- testDrop(type, containerType);
- testChangeContainer(topNodeType, type, containerType);
- }
-
- /**
- * Test to manage top node.
- *
- * @param topNodeType
- * the top node type
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToManageTopNode(IElementType topNodeType, IElementType type, int containerType) {
- testToManageTopNode(topNodeType, type, containerType, null);
- }
-
- /**
- * Test to manage top node and test if an editpolicy mask managed is applied.
- *
- * @param topNodeType
- * the top node type
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToManageTopNodeWithMask(IElementType topNodeType, IElementType type, int containerType,String initialName) {
- testToCreateATopNode(topNodeType);
- testToCreateANode(type, containerType, true, initialName);
- testDestroy(type, containerType);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- testViewDeletion(type, containerType);
- testDrop(type, containerType);
- testChangeContainer(topNodeType, type, containerType);
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildNode.java
deleted file mode 100644
index faceadde203..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildNode.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests.canonical;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.draw2d.geometry.Dimension;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.View;
-import org.junit.Before;
-
-/**
- * The Class TestChildNode.
- * Semantic tests shall be executed apart from the graphical test has one view may be related to a different number of UML elements
- * in different diagram
- */
-public abstract class TestChildNode extends AbstractTestNode {
-
- /** The root compartment. */
- protected ShapeCompartmentEditPart rootCompartment = null;
- protected boolean testAffixedNode=false;
-
-
-
- public boolean isTestAffixedNode() {
- return testAffixedNode;
- }
-
-
- public void setTestAffixedNode(boolean testAffixedNode) {
- this.testAffixedNode = testAffixedNode;
- }
-
- /**
- * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp()
- *
- * @throws Exception
- */
- @Before
- @Override
- public void setUp() throws Exception {
- super.setUp();
- CreateViewRequest requestcreation = createViewRequestShapeContainer();
- if(requestcreation != null) {
- requestcreation.setSize(new Dimension(500, 500));
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
- assertNotSame(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, UnexecutableCommand.INSTANCE, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
- executeOnUIThread(command);
- }
- assertEquals(CREATION + INITIALIZATION_TEST, 1, getDiagramEditPart().getChildren().size());
- GraphicalEditPart containerEditPart = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
- rootCompartment = null;
- int index = 0;
- while(rootCompartment == null && index < containerEditPart.getChildren().size()) {
- if((containerEditPart.getChildren().get(index)) instanceof ShapeCompartmentEditPart) {
- rootCompartment = (ShapeCompartmentEditPart)(containerEditPart.getChildren().get(index));
- }
- index++;
- }
- assertNotNull("There should be at least one container for the node tests", rootCompartment); //$NON-NLS-1$
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected IGraphicalEditPart getContainerEditPart() {
- if(testAffixedNode){
- return (IGraphicalEditPart)rootCompartment.getParent();
- }
- return rootCompartment;
- }
-
- /**
- * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView()
- *
- * @return
- */
- @Override
- protected View getRootView() {
- return (View)getContainerEditPart().getModel();
- }
-
- public void testToManageNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, int expectedGraphicalChildren, int expectedSemanticChildren, int addedGraphicalChildren, int addedSemanticChildren, boolean maskmanaged, String initialName,int numberSemanticChildreen) {
- // create a node
- testToCreateANode(type, expectedGraphicalChildren, expectedSemanticChildren, addedGraphicalChildren, addedSemanticChildren, maskmanaged,null, numberSemanticChildreen);
- // creates a second one
- testToCreateANode(type, expectedGraphicalChildren+1, expectedSemanticChildren+1, addedGraphicalChildren, addedSemanticChildren, maskmanaged,null,numberSemanticChildreen);
- // destroy the first element
- testDestroy(type, expectedGraphicalChildren+2*addedGraphicalChildren, 2, 1, 1);
- // destroy the second one
- testDestroy(type, expectedGraphicalChildren+addedGraphicalChildren, 1, 1, 1);
- // the node has been destroyed, the UML element also. restore one element
- undoOnUIThread();
- // the node and the UML element are present
- testViewDeletion(type,expectedGraphicalChildren+addedGraphicalChildren, 1, 1);
- // The node has been deleted, the uml element is still present
- testDrop(type, eClass,expectedGraphicalChildren,addedGraphicalChildren,addedSemanticChildren);
- // the node and element are present
- if(containerMove) {
- testChangeContainer(type, containerType);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestCommentLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestCommentLink.java
deleted file mode 100644
index b2e02595204..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestCommentLink.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests.canonical;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.uml2.uml.Element;
-
-public abstract class TestCommentLink extends TestLink {
-
- /**
- * Test view deletion.
- *
- * @param type
- * the type
- */
- @Override
- public void testViewDeletion(IElementType type) {
- //DELETION OF THE VIEW
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
- Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
- Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
- assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
- assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
- }
-
- /**
- * Test destroy.
- *
- * @param type
- * the type
- */
- @Override
- public void testDestroy(IElementType type) {
- //DESTROY SEMANTIC+ VIEW
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
- Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
- Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
- assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
- }
-
- /**
- * Test drop.
- *
- * @param type
- * the type
- */
- @Override
- public void testDrop(IElementType type) {
- //DROP
- //it is impossible to drop but you can recreat the link between this element
- assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DROP + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
- assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
- }
-
- /**
- * Test to create a link.
- *
- * @param linkType
- * the type
- */
- @Override
- public void testToCreateALink(IElementType linkType, String initialName) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
- Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
- assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
- }
-
- @Override
- public void installEnvironment(IElementType sourceType, IElementType targetType) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
- //create the source
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(100, 100));
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the source player to test reconnect
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(100, 300));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the target
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(300, 100));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the target player to test reconnect
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(300, 300));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
- sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
- target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
- targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
- }
-
- @Override
- public void testTargetReconnectAMultiLink(IElementType type) {
- //target reconnection
- ReconnectRequest reconnectRequest = new ReconnectRequest();
- assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart)target.getTargetConnections().get(0) != null);
- ConnectionEditPart binaryLink = (ConnectionEditPart)target.getTargetConnections().get(0);
- reconnectRequest.setConnectionEditPart(binaryLink);
- reconnectRequest.setTargetEditPart(targetPlayer);
- reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
- Command cmd = targetPlayer.getCommand(reconnectRequest);
- assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
- // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
- assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
- //undo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
- //redo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
- }
-
- @Override
- public void testSourceReconnectAMultiLink(IElementType type) {
- }
-
- /**
- * test the drop of a link where the source and the target are the same objects
- *
- * @param linkType
- * @param allowed
- */
- @Override
- protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
- }
-
- /**
- * test the creation of a link where the source and the target are the same objects
- *
- * @param linkType
- * @param allowed
- */
- @Override
- protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
- if(allowed) {
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
- assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 2);
- assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestConstraintLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestConstraintLink.java
deleted file mode 100644
index d8915bd868a..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestConstraintLink.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests.canonical;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.uml2.uml.Element;
-
-public abstract class TestConstraintLink extends TestLink {
-
- /**
- * Test view deletion.
- *
- * @param type
- * the type
- */
- @Override
- public void testViewDeletion(IElementType type) {
- //DELETION OF THE VIEW
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
- Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
- assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
- assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- }
-
- /**
- * Test destroy.
- *
- * @param type
- * the type
- */
- @Override
- public void testDestroy(IElementType type) {
- //DESTROY SEMANTIC+ VIEW
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
- Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
- assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- }
-
- /**
- * Test drop.
- *
- * @param type
- * the type
- */
- @Override
- public void testDrop(IElementType type) {
- //DROP
- //it is impossible to drop but you can recreat the link between this element
- assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DROP + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
- }
-
- /**
- * Test to create a link.
- *
- * @param linkType
- * the type
- */
- @Override
- public void testToCreateALink(IElementType linkType, String initialName) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
- assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- }
-
- @Override
- public void installEnvironment(IElementType sourceType, IElementType targetType) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
- //create the source
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(100, 100));
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the source player to test reconnect
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(100, 300));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the target
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(300, 100));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the target player to test reconnect
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(300, 300));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
- sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
- target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
- targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
- }
-
- @Override
- public void testTargetReconnectAMultiLink(IElementType type) {
- //target reconnection
- ReconnectRequest reconnectRequest = new ReconnectRequest();
- assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart)target.getTargetConnections().get(0) != null);
- ConnectionEditPart binaryLink = (ConnectionEditPart)target.getTargetConnections().get(0);
- reconnectRequest.setConnectionEditPart(binaryLink);
- reconnectRequest.setTargetEditPart(targetPlayer);
- reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
- Command cmd = targetPlayer.getCommand(reconnectRequest);
- assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
- // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
- assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
- //undo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
- //redo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
- }
-
- @Override
- public void testSourceReconnectAMultiLink(IElementType type) {
- }
-
- /**
- * test the drop of a link where the source and the target are the same objects
- *
- * @param linkType
- * @param allowed
- */
- @Override
- protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
- }
-
- /**
- * test the creation of a link where the source and the target are the same objects
- *
- * @param linkType
- * @param allowed
- */
- @Override
- protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
- if(allowed) {
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
- assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 2);
- assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContainmentLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContainmentLink.java
deleted file mode 100644
index bc5e43d274b..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContainmentLink.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests.canonical;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.uml2.uml.Element;
-
-public abstract class TestContainmentLink extends TestLink {
-
- /**
- * Test view deletion.
- *
- * @param type
- * the type
- */
- @Override
- public void testViewDeletion(IElementType type) {
- //DELETION OF THE VIEW
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
- Command command = ((ConnectionEditPart)source.getChildBySemanticHint("3032").getSourceConnections().get(0)).getCommand(deleteViewRequest); //$NON-NLS-1$
- assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 3);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 3);
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
- assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 3);
- assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- }
-
- /**
- * Test destroy.
- *
- * @param type
- * the type
- */
- @Override
- public void testDestroy(IElementType type) {
- //DESTROY SEMANTIC+ VIEW
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
- Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
- Command command = ((ConnectionEditPart)source.getChildBySemanticHint("3032").getSourceConnections().get(0)).getCommand(deleteViewRequest); //$NON-NLS-1$
- assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 3);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
- }
-
- /**
- * Test drop.
- *
- * @param type
- * the type
- */
- @Override
- public void testDrop(IElementType type) {
- //DROP
- //it is impossible to drop but you can recreat the link between this element
- assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
- assertTrue(DROP + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
- }
-
- /**
- * Test to create a link.
- *
- * @param linkType
- * the type
- */
- @Override
- public void testToCreateALink(IElementType linkType, String initialName) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
- Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 0);
- assertTrue(CREATION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- }
-
- @Override
- public void installEnvironment(IElementType sourceType, IElementType targetType) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
- //create the source
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(100, 100));
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the source player to test reconnect
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(100, 300));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the target
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(300, 100));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the target player to test reconnect
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(300, 300));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
- sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
- target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
- targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
- }
-
- @Override
- public void testTargetReconnectAMultiLink(IElementType type) {
- //target reconnection
- ReconnectRequest reconnectRequest = new ReconnectRequest();
- assertTrue(THE_LINK_RECONNECT_EXISTS, ((ConnectionEditPart)source.getChildBySemanticHint("3032").getSourceConnections().get(0)) != null); //$NON-NLS-1$
- ConnectionEditPart binaryLink = ((ConnectionEditPart)source.getChildBySemanticHint("3032").getSourceConnections().get(0)); //$NON-NLS-1$
- reconnectRequest.setConnectionEditPart(binaryLink);
- reconnectRequest.setTargetEditPart(targetPlayer);
- reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
- Command cmd = targetPlayer.getCommand(reconnectRequest);
- assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
- // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
- assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 3);
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
- //undo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
- //redo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
- }
-
- @Override
- public void testSourceReconnectAMultiLink(IElementType type) {
- //target reconnection
- ReconnectRequest reconnectRequest = new ReconnectRequest();
- assertTrue(THE_LINK_TO_RECONNECT_EXISTS, ((ConnectionEditPart)source.getChildBySemanticHint("3032").getSourceConnections().get(0)) != null); //$NON-NLS-1$
- ConnectionEditPart branch = ((ConnectionEditPart)source.getChildBySemanticHint("3032").getSourceConnections().get(0)); //$NON-NLS-1$
- reconnectRequest.setConnectionEditPart(branch);
- reconnectRequest.setTargetEditPart(sourcePlayer);
- reconnectRequest.setType(RequestConstants.REQ_RECONNECT_SOURCE);
- Command cmd = sourcePlayer.getCommand(reconnectRequest);
- //it is impossible to reconnect source of the link
- assertTrue(RECONNECTION_SOURCE + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == false);
- }
-
- /**
- * Test to manage top node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType) {
- installEnvironment(sourceType, targetType);
- testToCreateALink(linkType,null);
- testDestroy(linkType);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- testViewDeletion(linkType);
- testDrop(linkType);
- testRecreation(linkType);
- testSourceReconnectAMultiLink(linkType);
- testTargetReconnectAMultiLink(linkType);
- }
-
- public void testRecreation(IElementType linkType) {
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLink.java
deleted file mode 100644
index 59d761cc8ba..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLink.java
+++ /dev/null
@@ -1,531 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009, 2014 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 440263
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests.canonical;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.ChangeBoundsRequest;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers;
-import org.eclipse.papyrus.uml.diagram.common.Activator;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.uml2.uml.Element;
-import org.junit.Assert;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class TestTopLink to test when this is link . The link is attached to a semantic element that has to be contained by the source and the target.
- * To adapt when source owns the created link
- */
-public abstract class TestLink extends AbstractPapyrusTestCase {
-
- protected static final String THE_LINK_RECONNECT_EXISTS = "The Link exist"; //$NON-NLS-1$
-
- protected static final String RECONNECTION_TARGET = "Reconnection of target"; //$NON-NLS-1$
-
- protected static final String LINK_EXISTS_RECONNECTION_ON_TARGET = "Link exist on the target"; //$NON-NLS-1$
-
- protected static final String THE_LINK_TO_RECONNECT_EXISTS = "The Link exist"; //$NON-NLS-1$
-
- protected static final String RECONNECTION_SOURCE = "Reconnection of source"; //$NON-NLS-1$
-
- protected static final String LINK_EXISTS_RECONNECTION_ON_SOURCE = "Link exist on the source"; //$NON-NLS-1$
-
- protected GraphicalEditPart source = null;
-
- protected GraphicalEditPart sourcePlayer = null;
-
- protected GraphicalEditPart target = null;
-
- protected GraphicalEditPart targetPlayer = null;
-
- public abstract DiagramUpdater getDiagramUpdater();
- /**
- * Test view deletion.
- *
- * @param type
- * the type
- */
- public void testViewDeletion(IElementType type) {
- //DELETION OF THE VIEW
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5);
- Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
- Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
- assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 5);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 5);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
- assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 5);
- }
-
- /**
- * Retrieves the TransactionalEditingDomain
- *
- * @return the editing domain (can be null)
- */
- protected TransactionalEditingDomain getEditingDomain() {
- ServiceUtilsForActionHandlers serviceUtils = ServiceUtilsForActionHandlers.getInstance();
- TransactionalEditingDomain editingDomain = null;
- try {
- editingDomain = serviceUtils.getTransactionalEditingDomain();
- } catch (ServiceException e) {
- Activator.log.error(e);
- }
- return editingDomain;
- }
-
- /**
- * Test destroy.
- *
- * @param type
- * the type
- */
- public void testDestroy(IElementType type) {
- //DESTROY SEMANTIC+ VIEW
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5);
- Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
- Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
- assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- testEnableForDeleteFromModel();
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, diagramEditor.getDiagramEditDomain().getDiagramCommandStack().canUndo() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 5);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- }
-
- /**
- * Test drop.
- *
- * @param type
- * the type
- */
- public void testDrop(IElementType type) {
- //DROP
- assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
- DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
- ArrayList<Element> list = new ArrayList<Element>();
- list.add(getRootSemanticModel().getOwnedElements().get(4));
- dropObjectsRequest.setObjects(list);
- dropObjectsRequest.setLocation(new Point(20, 20));
- Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
- assertNotNull(DROP + COMMAND_NULL, command);
- assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 5);
- assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 5);
- assertTrue(DROP + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 5);
- assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
- }
-
- /**
- * Test change container.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testChangeContainer(IElementType type, IElementType containerType) {
- //CHANGE CONTAINER
- assertTrue(CHANGE_CONTAINER + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 1);
- assertTrue(CHANGE_CONTAINER + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 1);
- Request requestcreation = CreateViewRequestFactory.getCreateShapeRequest(containerType, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CONTAINER_CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 2);
- GraphicalEditPart containerEditPart = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
- ChangeBoundsRequest changeBoundsRequest = new ChangeBoundsRequest(RequestConstants.REQ_ADD);
- changeBoundsRequest.setEditParts((EditPart)getDiagramEditPart().getChildren().get(0));
- changeBoundsRequest.setLocation(new Point(30, 30));
- ShapeCompartmentEditPart compartment = null;
- int index = 0;
- while(compartment == null && index < containerEditPart.getChildren().size()) {
- if((containerEditPart.getChildren().get(index)) instanceof ShapeCompartmentEditPart) {
- compartment = (ShapeCompartmentEditPart)(containerEditPart.getChildren().get(index));
- }
- index++;
- }
- assertTrue("Container not found", compartment != null); //$NON-NLS-1$
- command = compartment.getCommand(changeBoundsRequest);
- assertNotNull(CHANGE_CONTAINER, command);
- assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
- assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 1);
- assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CHANGE_CONTAINER + TEST_THE_UNDO, getRootView().getChildren().size() == 2);
- assertTrue(CHANGE_CONTAINER + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 2);
- assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, compartment.getChildren().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CHANGE_CONTAINER + TEST_THE_REDO, getRootView().getChildren().size() == 1);
- assertTrue(CHANGE_CONTAINER + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 1);
- assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
- }
-
- /**
- * Test to create a link.
- *
- * @param linkType
- * the type
- */
- public void testToCreateALink(IElementType linkType,String initialName) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
- assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 5);
- ConnectionEditPart linkEditPart= (ConnectionEditPart)getDiagramEditPart().getConnections().get(0);
- testLinkEditPart(linkEditPart, initialName);
-
- Assert.assertEquals("Diagram updater must detect that node children has been created",4,getDiagramUpdater().getSemanticChildren(getRootView()).size()); //$NON-NLS-1$
- Assert.assertEquals("Diagram updater must detect that no link has been created",1,getDiagramUpdater().getContainedLinks(getRootView()).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no link are incoming",0,getDiagramUpdater().getIncomingLinks((View)((Diagram)getRootView()).getEdges().get(0)).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no link are outgoing",0,getDiagramUpdater().getOutgoingLinks((View)((Diagram)getRootView()).getEdges().get(0)).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no children has ben created in the new element",0,getDiagramUpdater().getSemanticChildren(((View)((Diagram)getRootView()).getEdges().get(0))).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no link has been created in the new element",0,getDiagramUpdater().getContainedLinks(((View)((Diagram)getRootView()).getEdges().get(0))).size()); //$NON-NLS-1$
-
- Assert.assertEquals ("Diagram updater must detect that no link are incoming",1,getDiagramUpdater().getIncomingLinks(target.getNotationView()).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no link are OutgoingLinks",0,getDiagramUpdater().getOutgoingLinks(target.getNotationView()).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no link are IncomingLinks",0,getDiagramUpdater().getIncomingLinks(source.getNotationView()).size()); //$NON-NLS-1$
- Assert.assertEquals ("Diagram updater must detect that no link are OutgoingLinks",1,getDiagramUpdater().getOutgoingLinks(source.getNotationView()).size()); //$NON-NLS-1$
-
-
- }
-
- /**
- * htis method is used to test the created link editpart
- * @param linkEditPart
- */
- protected void testLinkEditPart(ConnectionEditPart linkEditPart, String initialName) {
- Assert.assertNotNull("the editpart of the link must exist",linkEditPart); //$NON-NLS-1$
- EditPolicy policy=linkEditPart.getEditPolicy(org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE);
- Assert.assertNotNull("the link must have an edipolicy that to show or hide label",policy); //$NON-NLS-1$
- Assert.assertTrue("the policy of the link must be an instance of ShowHideLabelEditPolicy", policy instanceof org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy); //$NON-NLS-1$
- //get text aware
- ITextAwareEditPart namedEditPart=null;
- for(Iterator iteratorChildren = linkEditPart.getChildren().iterator(); iteratorChildren.hasNext();) {
- Object children = iteratorChildren.next();
- if (children instanceof ITextAwareEditPart&&(((ITextAwareEditPart)children).getEditText()!=null)&&(!((ITextAwareEditPart)children).getEditText().trim().equals(""))){ //$NON-NLS-1$
- namedEditPart=(ITextAwareEditPart)children;
- }
- }
- if(namedEditPart!=null){
- testNameLabel(namedEditPart,initialName);
- }
-
- }
-
- protected void testNameLabel(ITextAwareEditPart namedEditPart, String initialName) {
- Assert.assertTrue("the primary editpart must be the namelabelEditpart", namedEditPart instanceof GraphicalEditPart); //$NON-NLS-1$
- EObject element = ((GraphicalEditPart)namedEditPart).resolveSemanticElement();
- String name = NamedElementUtil.isAutoNamed(element) ? element.eClass().getName() : null;
- if(initialName != null) {
- name = initialName;
- }
- if(name != null) {
- if(name.length() < ((ITextAwareEditPart)namedEditPart).getEditText().length()) {
- Assert.assertEquals(" the name must contain the name of the metaclass", name, ((ITextAwareEditPart)namedEditPart).getEditText().substring(0, name.length())); //$NON-NLS-1$
- } else {
- //not the same it sure but display the mistake is important
- Assert.assertEquals(" the name must contain the name of the metaclass", name, ((ITextAwareEditPart)namedEditPart).getEditText()); //$NON-NLS-1$
- }
- }
- }
-
- public void installEnvironment(IElementType sourceType, IElementType targetType) {
- assertEquals(CREATION + INITIALIZATION_TEST, 0, getDiagramEditPart().getChildren().size());
- assertEquals(CREATION + INITIALIZATION_TEST, 0, getRootSemanticModel().getOwnedElements().size());
- //create the source
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(100, 100));
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the source player to test reconnect
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(100, 300));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the target
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(300, 100));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the target player to test reconnect
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(300, 300));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
- sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
- target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
- targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
- }
-
- public CreateConnectionViewRequest createConnectionViewRequest(IElementType type, EditPart source, EditPart target) {
- CreateConnectionViewRequest connectionRequest = CreateViewRequestFactory.getCreateConnectionRequest(type, ((IGraphicalEditPart)getDiagramEditPart()).getDiagramPreferencesHint());
- connectionRequest.setSourceEditPart(null);
- connectionRequest.setTargetEditPart(source);
- connectionRequest.setType(RequestConstants.REQ_CONNECTION_START);
- source.getCommand(connectionRequest);
- // Now, setup the request in preparation to get the
- // connection end
- // command.
- connectionRequest.setSourceEditPart(source);
- connectionRequest.setTargetEditPart(target);
- connectionRequest.setType(RequestConstants.REQ_CONNECTION_END);
- return connectionRequest;
- }
-
- public void testTargetReconnectAMultiLink(IElementType type) {
- //target reconnection
- ReconnectRequest reconnectRequest = new ReconnectRequest();
- assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart)target.getTargetConnections().get(0) != null);
- ConnectionEditPart binaryLink = (ConnectionEditPart)target.getTargetConnections().get(0);
- reconnectRequest.setConnectionEditPart(binaryLink);
- reconnectRequest.setTargetEditPart(targetPlayer);
- reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
- Command cmd = targetPlayer.getCommand(reconnectRequest);
- assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
- // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
- assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 5);
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
- //undo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
- //redo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
- }
-
- public void testSourceReconnectAMultiLink(IElementType type) {
- //target reconnection
- ReconnectRequest reconnectRequest = new ReconnectRequest();
- assertTrue(THE_LINK_TO_RECONNECT_EXISTS, (ConnectionEditPart)source.getSourceConnections().get(0) != null);
- ConnectionEditPart branch = (ConnectionEditPart)source.getSourceConnections().get(0);
- reconnectRequest.setConnectionEditPart(branch);
- reconnectRequest.setTargetEditPart(sourcePlayer);
- reconnectRequest.setType(RequestConstants.REQ_RECONNECT_SOURCE);
- Command cmd = sourcePlayer.getCommand(reconnectRequest);
- assertTrue(RECONNECTION_SOURCE + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
- assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 5);
- assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_EXECUTION, branch.getSource().equals(sourcePlayer));
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_UNDO, branch.getSource().equals(source));
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_REDO, branch.getSource().equals(sourcePlayer));
- }
-
- /**
- * Test to manage top node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, boolean allowedOntheSame, String initialName) {
- installEnvironment(sourceType, targetType);
- testToCreateALink(linkType, initialName);
- testDestroy(linkType);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- testViewDeletion(linkType);
- testDrop(linkType);
- testSourceReconnectAMultiLink(linkType);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- testTargetReconnectAMultiLink(linkType);
- testToCreateAlinkOnTheSame(linkType, allowedOntheSame);
- testToDropAlinkOnTheSame(linkType, allowedOntheSame);
- }
- /**
- * Test to manage top node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, boolean allowedOntheSame) {
- testToManageLink(sourceType, targetType, linkType, containerType, allowedOntheSame, null);
- }
-
- /**
- * test the drop of a link where the source and the target are the same objects
- *
- * @param linkType
- * @param allowed
- */
- protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
- //DROP
- if(allowed) {
- assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
- DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
- ArrayList<Element> list = new ArrayList<Element>();
- list.add(getRootSemanticModel().getOwnedElements().get(5));
- dropObjectsRequest.setObjects(list);
- dropObjectsRequest.setLocation(new Point(20, 20));
- Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
- assertNotNull(DROP + COMMAND_NULL, command);
- assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
- assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 3);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 6);
- assertTrue(DROP + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 2);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
- assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 3);
- }
- }
-
- /**
- * test the creation of a link where the source and the target are the same objects
- *
- * @param linkType
- * @param allowed
- */
- protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5);
- Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
- if(allowed) {
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
- assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 5);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 2);
- assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
- }
- }
- /**
- * test id the handler delete from model is enable
- */
- protected void testEnableForDeleteFromModel() {
- ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
- org.eclipse.core.commands.Command cmd = commandService.getCommand("org.eclipse.ui.edit.delete"); //$NON-NLS-1$
- IHandler handler = cmd.getHandler();
- if(handler instanceof AbstractHandler) {
- ((AbstractHandler)handler).setEnabled("org.eclipse.ui.edit.delete"); //$NON-NLS-1$
- }
- boolean res = handler.isEnabled();
- assertTrue("Delete from model handler must be enable",res); //$NON-NLS-1$
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkOwnedBySource.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkOwnedBySource.java
deleted file mode 100644
index dac3ddefcfa..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkOwnedBySource.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests.canonical;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.uml2.uml.Element;
-
-public abstract class TestLinkOwnedBySource extends TestLink {
-
- /**
- * Test view deletion.
- *
- * @param type
- * the type
- */
- @Override
- public void testViewDeletion(IElementType type) {
- //DELETION OF THE VIEW
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
- Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
- assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
- assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- }
-
- /**
- * Test destroy.
- *
- * @param type
- * the type
- */
- @Override
- public void testDestroy(IElementType type) {
- //DESTROY SEMANTIC+ VIEW
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
- Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
- assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- testEnableForDeleteFromModel();
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
- }
-
- /**
- * Test drop.
- *
- * @param type
- * the type
- */
- @Override
- public void testDrop(IElementType type) {
- //DROP
- assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DROP + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
- DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
- ArrayList<Element> list = new ArrayList<Element>();
- list.add(((Element)source.resolveSemanticElement()).getOwnedElements().get(0));
- dropObjectsRequest.setObjects(list);
- dropObjectsRequest.setLocation(new Point(20, 20));
- Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
- assertNotNull(DROP + COMMAND_NULL, command);
- assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DROP + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DROP + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DROP + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
- }
-
- /**
- * Test to create a link.
- *
- * @param linkType
- * the type
- */
- @Override
- public void testToCreateALink(IElementType linkType, String initialName) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
- Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
- assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
- }
-
- @Override
- public void installEnvironment(IElementType sourceType, IElementType targetType) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
- //create the source
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(100, 100));
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the source player to test reconnect
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(100, 300));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the target
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(300, 100));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- //create the target player to test reconnect
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(new Point(300, 300));
- command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
- sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
- target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
- targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
- }
-
- @Override
- public void testTargetReconnectAMultiLink(IElementType type) {
- //target reconnection
- ReconnectRequest reconnectRequest = new ReconnectRequest();
- assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart)target.getTargetConnections().get(0) != null);
- ConnectionEditPart binaryLink = (ConnectionEditPart)target.getTargetConnections().get(0);
- reconnectRequest.setConnectionEditPart(binaryLink);
- reconnectRequest.setTargetEditPart(targetPlayer);
- reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
- Command cmd = targetPlayer.getCommand(reconnectRequest);
- assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
- // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
- assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
- //undo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
- //redo
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
- }
-
- @Override
- public void testSourceReconnectAMultiLink(IElementType type) {
- //target reconnection
- ReconnectRequest reconnectRequest = new ReconnectRequest();
- assertTrue(THE_LINK_TO_RECONNECT_EXISTS, (ConnectionEditPart)source.getSourceConnections().get(0) != null);
- ConnectionEditPart branch = (ConnectionEditPart)source.getSourceConnections().get(0);
- reconnectRequest.setConnectionEditPart(branch);
- reconnectRequest.setTargetEditPart(sourcePlayer);
- reconnectRequest.setType(RequestConstants.REQ_RECONNECT_SOURCE);
- Command cmd = sourcePlayer.getCommand(reconnectRequest);
- assertTrue(RECONNECTION_SOURCE + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
- assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
- assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_EXECUTION, branch.getSource().equals(sourcePlayer));
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_UNDO, branch.getSource().equals(source));
- getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_REDO, branch.getSource().equals(sourcePlayer));
- }
-
- /**
- * test the drop of a link where the source and the target are the same objects
- *
- * @param linkType
- * @param allowed
- */
- @Override
- protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
- //DROP
- if(allowed) {
- assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
- DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
- ArrayList<Element> list = new ArrayList<Element>();
- list.add(((Element)source.resolveSemanticElement()).getOwnedElements().get(1));
- dropObjectsRequest.setObjects(list);
- dropObjectsRequest.setLocation(new Point(20, 20));
- Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
- assertNotNull(DROP + COMMAND_NULL, command);
- assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 3);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DROP + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 2);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 3);
- }
- }
-
- /**
- * test the creation of a link where the source and the target are the same objects
- *
- * @param linkType
- * @param allowed
- */
- @Override
- protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
- if(allowed) {
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
- assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 2);
- assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkWithParent.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkWithParent.java
deleted file mode 100644
index 9014b23bf73..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkWithParent.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests.canonical;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.uml2.uml.Element;
-
-/**
- * The Class TestLinkWithParent use to test link between elements with parent.
- */
-public abstract class TestLinkWithParent extends TestLink {
-
-
- /** The Constant DEFAULT_DROP_LOCATION. */
- protected static final Point DEFAULT_DROP_LOCATION = new Point(20, 20);
-
- /** The default source location. */
- protected static Point DEFAULT_SOURCE_LOCATION = new Point(300, 100);
-
- /** The default parent location. */
- protected static Point DEFAULT_PARENT_LOCATION = new Point(100, 100);
-
- // dyn values
-
- /** The begin root semantic owned element size. */
- protected int beginRootSemanticOwnedElementSize;
-
- /** The end root semantic owned element size. */
- protected int endRootSemanticOwnedElementSize;
-
- /** The begin diagram edit part children size. */
- protected int beginDiagramEditPartChildrenSize;
-
- /** The end diagram edit part children size. */
- protected int endDiagramEditPartChildrenSize;
-
- /** The begin root edge size. */
- protected int beginRootEdgeSize;
-
- /** The end root edge size. */
- protected int endRootEdgeSize;
-
- /** The begin source connections size. */
- protected int beginSourceConnectionsSize;
-
- /** The end source connections size. */
- protected int endSourceConnectionsSize;
-
- /** The begin root view children size. */
- protected int beginRootViewChildrenSize;
-
- /** The end root view children size. */
- protected int endRootViewChildrenSize;
-
- /** The parent type. */
- public IElementType parentType;
-
- /** The parent. */
- public GraphicalEditPart parent;
-
- /** The link element. */
- private Element linkElement;
-
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#installEnvironment(org.eclipse.gmf.runtime.emf.type.core.IElementType,
- * org.eclipse.gmf.runtime.emf.type.core.IElementType)
- *
- * @param sourceType
- * @param targetType
- */
-
- @Override
- public void installEnvironment(IElementType sourceType, IElementType targetType) {
-
- //create the parent source
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(parentType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(DEFAULT_PARENT_LOCATION);
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertTrue(command.canExecute());
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);;
- parent = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
-
- //create the source
- requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
- requestcreation.setLocation(DEFAULT_SOURCE_LOCATION);
- command = parent.getCommand(requestcreation);
- assertTrue(command.canExecute());
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- // FIXME : get(0) : header; get(1) : container
- List<GraphicalEditPart> children = parent.getChildren();
- source = children.get(2);
- }
-
-
-
- /**
- * Check that the link is impossible to create
- *
- * @param sourceType
- * the source type
- * @param targetType
- * the target type
- * @param linkType
- * the link type
- */
- public void testImpossibleToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType) {
- installEnvironment(sourceType, targetType);
- Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
- assertFalse(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command != null && command.canExecute());
- }
-
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testToManageLink(org.eclipse.gmf.runtime.emf.type.core.IElementType,
- * org.eclipse.gmf.runtime.emf.type.core.IElementType, org.eclipse.gmf.runtime.emf.type.core.IElementType,
- * org.eclipse.gmf.runtime.emf.type.core.IElementType, boolean)
- *
- * @param sourceType
- * @param targetType
- * @param linkType
- * @param containerType
- * @param allowedOntheSame
- */
-
- @Override
- public void testToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, boolean allowedOntheSame) {
- installEnvironment(sourceType, targetType);
- testToCreateALink(linkType,null);
- testDestroy(linkType);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- testViewDeletion(linkType);
- testDrop(linkType);
- // destroy the element
- Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
- Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- // test link on the same
- testToCreateAlinkOnTheSame(linkType, allowedOntheSame);
-
- if(allowedOntheSame) {
-
- ConnectionEditPart graphicalEditPart = (ConnectionEditPart)source.getSourceConnections().get(0);
- View view = (View)graphicalEditPart.getModel();
- linkElement = (Element)view.getElement();
-
- deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
- command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
- assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- testToDropAlinkOnTheSame(linkType, allowedOntheSame);
- }
-
-
- }
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testToCreateALink(org.eclipse.gmf.runtime.emf.type.core.IElementType)
- *
- * @param linkType
- */
-
- @Override
- public void testToCreateALink(IElementType linkType, String initialName) {
- assertEquals(CREATION + INITIALIZATION_TEST, beginDiagramEditPartChildrenSize, getDiagramEditPart().getChildren().size());
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == beginRootSemanticOwnedElementSize);
- assertTrue(CREATION + INITIALIZATION_TEST, source.getSourceConnections().size() == beginSourceConnectionsSize);
- Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + INITIALIZATION_TEST, source.getSourceConnections().size() == endSourceConnectionsSize);
- ConnectionEditPart graphicalEditPart = (ConnectionEditPart)source.getSourceConnections().get(0);
- View view = (View)graphicalEditPart.getModel();
- linkElement = (Element)view.getElement();
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
- assertEquals(CREATION + INITIALIZATION_TEST, endRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertEquals(CREATION + TEST_THE_UNDO, endRootViewChildrenSize, getRootView().getChildren().size());
- assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == beginRootSemanticOwnedElementSize);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
- assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- }
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testDestroy(org.eclipse.gmf.runtime.emf.type.core.IElementType)
- *
- * @param type
- */
-
- @Override
- public void testDestroy(IElementType type) { // BMA : FIXME : unused param
- //DESTROY SEMANTIC+ VIEW
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == endSourceConnectionsSize);
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
- Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
- assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- testEnableForDeleteFromModel();
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == beginRootEdgeSize);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == beginSourceConnectionsSize);
- assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == beginRootSemanticOwnedElementSize);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, diagramEditor.getDiagramEditDomain().getDiagramCommandStack().canUndo() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == endSourceConnectionsSize);
- assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == beginRootEdgeSize);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == beginSourceConnectionsSize);
- assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == beginRootSemanticOwnedElementSize);
- }
-
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testViewDeletion(org.eclipse.gmf.runtime.emf.type.core.IElementType)
- *
- * @param type
- */
-
- @Override
- public void testViewDeletion(IElementType type) { // BMA : FIXME : unused param
- //DELETION OF THE VIEW
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == endSourceConnectionsSize);
- assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
- Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
- assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == beginSourceConnectionsSize);
- assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == endSourceConnectionsSize);
- assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == beginSourceConnectionsSize);
- assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- }
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testDrop(org.eclipse.gmf.runtime.emf.type.core.IElementType)
- *
- * @param type
- */
-
- @Override
- public void testDrop(IElementType type) {// BMA : FIXME : unused param
- //DROP
- assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
- assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == beginRootEdgeSize);
- DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
- List<Element> list = new ArrayList<Element>();
- list.add(linkElement);
- dropObjectsRequest.setObjects(list);
- dropObjectsRequest.setLocation(DEFAULT_DROP_LOCATION);
- Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
- assertNotNull(DROP + COMMAND_NULL, command);
- assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == endDiagramEditPartChildrenSize);
- assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
- assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- assertTrue(DROP + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == beginRootEdgeSize);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == endDiagramEditPartChildrenSize);
- assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
- }
-
-
-
- /**
- * test the drop of a link where the source and the target are the same objects.
- *
- * @param linkType
- * the link type
- * @param allowed
- * the allowed
- */
- @Override
- protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
- //DROP
- if(allowed) {
- assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
- assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == beginRootEdgeSize);
- DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
- List<Element> list = new ArrayList<Element>();
- list.add(linkElement);
- dropObjectsRequest.setObjects(list);
- dropObjectsRequest.setLocation(DEFAULT_DROP_LOCATION);
- Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
- assertNotNull(DROP + COMMAND_NULL, command);
- assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == endDiagramEditPartChildrenSize);
- assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
- assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- assertTrue(DROP + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == beginRootEdgeSize);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == endDiagramEditPartChildrenSize);
- assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
- assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
- }
- }
-
- /**
- * test the creation of a link where the source and the target are the same objects.
- *
- * @param linkType
- * the link type
- * @param allowed
- * the allowed
- */
- @Override
- protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
- assertEquals(CREATION + INITIALIZATION_TEST, beginRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
- Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertEquals(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute(), allowed);
- if(allowed) {
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertEquals(CREATION + INITIALIZATION_TEST, endRootEdgeSize, ((Diagram)getRootView()).getEdges().size());
- assertEquals(CREATION + INITIALIZATION_TEST, endRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertEquals(CREATION + TEST_THE_UNDO, beginRootViewChildrenSize, getRootView().getChildren().size());
- assertEquals(CREATION + TEST_THE_UNDO, beginRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertEquals(CREATION + TEST_THE_REDO, endRootEdgeSize, ((Diagram)getRootView()).getEdges().size());
- assertEquals(CREATION + TEST_THE_REDO, endRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
- }
- }
-
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestNested.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestNested.java
deleted file mode 100644
index 0f788b91441..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestNested.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests.canonical;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.uml2.uml.Element;
-
-public abstract class TestNested extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
-
- /** The top node. */
- protected GraphicalEditPart topNode;
-
- /** The Child node. */
- protected GraphicalEditPart childNode;
-
- /**
- * Test to create a nested classifier node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToCreateAChildLabel(IElementType type, int containerType) {
- ListCompartmentEditPart compartment = null;
- int index = 0;
- while(compartment == null && index < getChildEditPart().getChildren().size()) {
- if((getChildEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getChildEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) { //$NON-NLS-1$
- compartment = (ListCompartmentEditPart)(getChildEditPart().getChildren().get(index));
- }
- index++;
- }
- assertTrue("Container not found", compartment != null); //$NON-NLS-1$
- //CREATION
- assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModelchild().getOwnedElements().size() == 0);
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = compartment.getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, compartment.getChildren().size() == 0);
- assertTrue(CREATION + TEST_THE_UNDO, ((Element)((View)getChildEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue("CREATION: " + TEST_THE_REDO, compartment.getChildren().size() == 1); //$NON-NLS-1$
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToCreateANode(IElementType type, int containerType) {
- ResizableCompartmentEditPart compartment = null;
- int index = 0;
- while(compartment == null && index < getTopEditPart().getChildren().size()) {
- if((getTopEditPart().getChildren().get(index)) instanceof ResizableCompartmentEditPart) {
- if((((View)((ResizableCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) { //$NON-NLS-1$
- compartment = (ResizableCompartmentEditPart)(getTopEditPart().getChildren().get(index));
- }
- }
- index++;
- }
- assertTrue("Container not found", compartment != null); //$NON-NLS-1$
- //CREATION
- assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
- assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = compartment.getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true); //$NON-NLS-1$
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
- assertTrue(CREATION + TEST_THE_UNDO, compartment.getChildren().size() == 0);
- assertTrue(CREATION + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
- assertTrue("CREATION: " + TEST_THE_REDO, compartment.getChildren().size() == 1); //$NON-NLS-1$
- childNode = (GraphicalEditPart)compartment.getChildren().get(0);
- }
-
- /**
- * Gets the root semantic modelchild.
- *
- * @return the root semantic modelchild
- */
- private Element getRootSemanticModelchild() {
- return (Element)((View)getChildEditPart().getModel()).getElement();
- }
-
- /**
- * Test to create a top node.
- *
- * @param type
- * the type
- */
- public void testToCreateATopNode(IElementType type) {
- //CREATION
- assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
- assertTrue(CREATION + INITIALIZATION_TEST, ((Element)((View)getDiagramEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull(CREATION + COMMAND_NULL, command);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
- assertTrue(CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
- assertTrue(CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
- topNode = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
- }
-
- /**
- * Gets the top edit part.
- *
- * @return the top edit part
- */
- public GraphicalEditPart getTopEditPart() {
- return topNode;
- }
-
- /**
- * Gets the Child edit part.
- *
- * @return the Child edit part
- */
- public GraphicalEditPart getChildEditPart() {
- return childNode;
- }
-
- /**
- * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootSemanticModel()
- *
- * @return
- */
- @Override
- protected Element getRootSemanticModel() {
- return (Element)((View)getTopEditPart().getModel()).getElement();
- }
-
- /**
- * Test to manage top node.
- *
- * @param type
- * the type
- * @param containerType
- * the container type
- */
- public void testToManageTopNode(IElementType parentNodeType, IElementType topNodeType, IElementType type, int containerChilType, int containerType) {
- //Parent Node
- testToCreateATopNode(parentNodeType);
- //Top Node
- testToCreateANode(topNodeType, containerChilType);
- //Nested classifier
- testToCreateAChildLabel(type, containerType);
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestTopNode.java
deleted file mode 100644
index 55dd6791f1a..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestTopNode.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.tests.canonical;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-
-/**
- * The Class TestTopNode.
- */
-public abstract class TestTopNode extends AbstractTestNode {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected IGraphicalEditPart getContainerEditPart() {
- return getDiagramEditPart();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected View getRootView() {
- return (View)getContainerEditPart().getModel();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected boolean isSemanticTest() {
- return true;
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/META-INF/MANIFEST.MF
index 25370d72217..2b3edce7fef 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/META-INF/MANIFEST.MF
@@ -16,7 +16,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
org.eclipse.gmf.tooling.runtime,
org.eclipse.papyrus.uml.service.types;bundle-version="1.0.0",
- org.eclipse.uml2.uml.editor
+ org.eclipse.uml2.uml.editor,
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.uml.diagram.activity.tests
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/src/org/eclipse/papyrus/uml/diagram/activity/tests/canonical/TestActivityGroup.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/src/org/eclipse/papyrus/uml/diagram/activity/tests/canonical/TestActivityGroup.java
index fa9e048d791..d6124d3630a 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/src/org/eclipse/papyrus/uml/diagram/activity/tests/canonical/TestActivityGroup.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests/src/org/eclipse/papyrus/uml/diagram/activity/tests/canonical/TestActivityGroup.java
@@ -15,7 +15,7 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
-import org.eclipse.papyrus.junit.utils.classification.FailingTest;
+import org.eclipse.papyrus.junit.framework.classification.FailingTest;
import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityActivityContentCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityEditPart;
import org.eclipse.papyrus.uml.diagram.activity.edit.parts.ActivityPartitionActivityPartitionContentCompartmentEditPart;
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.classpath
index 046bda900d2..23f23cf2994 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.classpath
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.classpath
@@ -3,5 +3,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="test"/>
+ <classpathentry kind="src" path="test-gen"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/META-INF/MANIFEST.MF
index 0aaad09090c..60e1e2437b9 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/META-INF/MANIFEST.MF
@@ -13,8 +13,14 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.gmf.tooling.runtime,
+ org.eclipse.ui.ide;bundle-version="3.10.0",
+ org.eclipse.emf.common.ui;bundle-version="2.9.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
-Export-Package: org.eclipse.papyrus.uml.diagram.clazz.test,
+Export-Package: org.eclipse.papyrus.diagram.clazz.test.createFromPalette,
+ org.eclipse.papyrus.uml.diagram.clazz.test,
org.eclipse.papyrus.uml.diagram.clazz.test.canonical,
org.eclipse.papyrus.uml.diagram.clazz.test.load
Bundle-Vendor: %providerName
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/build.properties
index 5bac2d0c4cd..fd6934cc081 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/build.properties
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/build.properties
@@ -1,6 +1,8 @@
-source.. = test/
+source.. = test/,\
+ test-gen/
output.. = bin/
bin.includes = META-INF/,\
.,\
about.html,\
plugin.properties
+src.includes = about.html
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/ClassDiagramTest.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.di
index 8634d4c00e0..8634d4c00e0 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/ClassDiagramTest.di
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.di
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/ClassDiagramTest.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.notation
index 8634d4c00e0..8634d4c00e0 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/ClassDiagramTest.notation
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.notation
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/ClassDiagramTest.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.uml
index d840f4353bb..d840f4353bb 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/ClassDiagramTest.uml
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/ClassDiagramTest.uml
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/legacyPackage/package24.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/legacyPackage/package24.di
index fa44dbfd5bc..fa44dbfd5bc 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/legacyPackage/package24.di
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/legacyPackage/package24.di
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/legacyPackage/package24.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/legacyPackage/package24.notation
index 797265662d8..797265662d8 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/legacyPackage/package24.notation
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/legacyPackage/package24.notation
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/legacyPackage/package24.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/legacyPackage/package24.uml
index b58df229832..b58df229832 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/model/legacyPackage/package24.uml
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/model/legacyPackage/package24.uml
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/org.eclipse.papyrus.diagram.clazz.test.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.diagram.clazz.test.launch
index f5cf5a57bad..f5cf5a57bad 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/org.eclipse.papyrus.diagram.clazz.test.launch
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.diagram.clazz.test.launch
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.uml.diagram.clazz.test.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.uml.diagram.clazz.test.launch
deleted file mode 100644
index 5a2b2664bd4..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.uml.diagram.clazz.test.launch
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.diagram.clazz.test.AllTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.diagram.clazz.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms256m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="true"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/plugin.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/plugin.properties
index 2e8300d859c..888a11daca8 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/plugin.properties
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/plugin.properties
@@ -8,5 +8,5 @@
# Contributors:
# Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - initial API and implementation
##################################################################################
-pluginName=Papyrus Class Diagram Test (Incubation)
+pluginName=Papyrus Class Diagram Test
providerName=Eclipse Modeling Project
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/AllCanonicalTestsGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/AllCanonicalTestsGen.java
index 8e7fc1e8234..8e7fc1e8234 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/AllCanonicalTestsGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/AllCanonicalTestsGen.java
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInClassEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInClassEditPartGen.java
index bc7801840af..ef3b6d24cde 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInClassEditPartGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInClassEditPartGen.java
@@ -33,6 +33,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PropertyForClassEditPart
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInCommentEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInCommentEditPartGen.java
index 1280f7fd9fc..1c078e214cc 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInCommentEditPartGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInCommentEditPartGen.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInComponentEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInComponentEditPartGen.java
index ffb4ee1a70f..1a323572a1b 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInComponentEditPartGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInComponentEditPartGen.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInConstraintEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInConstraintEditPartGen.java
index c71bbff445a..b1b6a8329b4 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInConstraintEditPartGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInConstraintEditPartGen.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInDataTypeEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInDataTypeEditPartGen.java
index 6a0415bbef4..bc2df8306ca 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInDataTypeEditPartGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInDataTypeEditPartGen.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInEnumerationEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInEnumerationEditPartGen.java
index 3017a4f3a66..f59d0f7e853 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInEnumerationEditPartGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInEnumerationEditPartGen.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInformationItemEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInformationItemEditPartGen.java
index f56329a1ff8..666e42a3405 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInformationItemEditPartGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInformationItemEditPartGen.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInstanceSpecificationEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInstanceSpecificationEditPartGen.java
index 0cf9745bf92..53eb47c2093 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInstanceSpecificationEditPartGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInInstanceSpecificationEditPartGen.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInModelEditPartTNGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInModelEditPartTNGen.java
index 11815bf286a..6f194064be3 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInModelEditPartTNGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInModelEditPartTNGen.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPackageEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPackageEditPartGen.java
index 494389ad735..bd66653dbf5 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPackageEditPartGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPackageEditPartGen.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPrimitiveTypeEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPrimitiveTypeEditPartGen.java
index 341c11f1e07..18a2244e59b 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPrimitiveTypeEditPartGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInPrimitiveTypeEditPartGen.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInSignalEditPartGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInSignalEditPartGen.java
index e1202270723..f75f8299c73 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInSignalEditPartGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramChildNodeInSignalEditPartGen.java
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkGen.java
index cf62119e2d3..cfe2f16ec33 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkGen.java
@@ -34,6 +34,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.UsageEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateLinkFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkOwnedBySourceGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkOwnedBySourceGen.java
index 348f12cd102..99278704a2b 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkOwnedBySourceGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramLinkOwnedBySourceGen.java
@@ -35,6 +35,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SubstitutionEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateLinkOwnedBySourceFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramTopNodeGen.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramTopNodeGen.java
index 7e0b08e6df8..b5238c47734 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramTopNodeGen.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test-gen/org/eclipse/papyrus/diagram/clazz/test/createFromPalette/TestClassDiagramTopNodeGen.java
@@ -30,6 +30,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.createFromPalette.CreateNodeFromPaletteTest;
import org.junit.Test;
// TODO: Auto-generated Javadoc
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/Activator.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/Activator.java
index 6e852dc7eed..d24df4f6bed 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/Activator.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/Activator.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* Copyright (c) 2013 CEA LIST.
*
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,7 +21,7 @@ import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.diagram.clazz.tests";
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.diagram.clazz.tests";
// The shared instance
private static Activator plugin;
@@ -34,7 +34,7 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
@Override
@@ -45,7 +45,7 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
@Override
@@ -56,7 +56,7 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java
index 54edde00ee1..a4cc80b0140 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java
@@ -14,6 +14,7 @@
package org.eclipse.papyrus.uml.diagram.clazz.test;
import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AllCanonicalTests;
+import org.eclipse.papyrus.uml.diagram.clazz.test.legacy.PackageDiagramLegacyTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@@ -25,6 +26,7 @@ import org.junit.runners.Suite.SuiteClasses;
@SuiteClasses({
// canonical
AllCanonicalTests.class,
+PackageDiagramLegacyTest.class
// load
//LoadTests.class
})
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java
index 51777105157..5e489423ea4 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java
@@ -39,6 +39,7 @@ TestDropfunction.class,
//test is a static operation is underlined
TestStaticFeatureRepresentation.class,
//test nested classifier
-TestClassDiagramNestedClassifier.class, })
+TestClassDiagramNestedClassifier.class,
+})
public class AllCanonicalTests {
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestAppearanceClassDiagramTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestAppearanceClassDiagramTopNode.java
index 64d16f22e66..eea90f91432 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestAppearanceClassDiagramTopNode.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestAppearanceClassDiagramTopNode.java
@@ -18,6 +18,7 @@ import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.appearance.AppearanceNodeTest;
import org.junit.Test;
/**
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildLabel.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildLabel.java
index 68949229ef2..cb82da2bf2c 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildLabel.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildLabel.java
@@ -15,8 +15,11 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.junit.framework.classification.FailingTest;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassAttributeCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNestedClassifierCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassOperationCompartmentEditPart;
@@ -36,12 +39,15 @@ import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
import org.eclipse.papyrus.uml.diagram.tests.canonical.TestChildLabel;
import org.junit.Test;
-// TODO: Auto-generated Javadoc
/**
* The Class TestClassDiagramChildLabel.
*/
public class TestClassDiagramChildLabel extends TestChildLabel {
-
+ @Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+
@Override
protected ICreationCommand getDiagramCommandCreation() {
return new CreateClassDiagramCommand();
@@ -58,15 +64,16 @@ public class TestClassDiagramChildLabel extends TestChildLabel {
}
@Test
+ @FailingTest
public void testToManageInstanceSlot() {
//instance specification
- testToManageTopNode(UMLElementTypes.InstanceSpecification_2001, UMLElementTypes.Slot_3030, InstanceSpecificationSlotCompartmentEditPart.VISUAL_ID);
+ testToManageTopNode(UMLElementTypes.InstanceSpecification_2001, UMLElementTypes.Slot_3030, InstanceSpecificationSlotCompartmentEditPart.VISUAL_ID, "<UNDEFINED>");
}
@Test
public void testToManageComponentProperty() {
//instance specification
- testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Property_3002, ComponentAttributeCompartmentEditPart.VISUAL_ID);
+ testToManageTopNodeWithMask(UMLElementTypes.Component_2002, UMLElementTypes.Property_3002, ComponentAttributeCompartmentEditPart.VISUAL_ID,"Attribute");
}
@Test
@@ -108,25 +115,25 @@ public class TestClassDiagramChildLabel extends TestChildLabel {
@Test
public void testToManageComponentOperation() {
//instance specification
- testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Operation_3003, ComponentOperationCompartmentEditPart.VISUAL_ID);
+ testToManageTopNodeWithMask(UMLElementTypes.Component_2002, UMLElementTypes.Operation_3003, ComponentOperationCompartmentEditPart.VISUAL_ID,null);
}
@Test
public void testToManageSignalProperty() {
//instance specification
- testToManageTopNode(UMLElementTypes.Signal_2003, UMLElementTypes.Property_3005, SignalAttributeCompartmentEditPart.VISUAL_ID);
+ testToManageTopNodeWithMask(UMLElementTypes.Signal_2003, UMLElementTypes.Property_3005, SignalAttributeCompartmentEditPart.VISUAL_ID,"Attribute");
}
@Test
public void testToManageInterfaceProperty() {
//interface
- testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Property_3006, InterfaceAttributeCompartmentEditPart.VISUAL_ID);
+ testToManageTopNodeWithMask(UMLElementTypes.Interface_2004, UMLElementTypes.Property_3006, InterfaceAttributeCompartmentEditPart.VISUAL_ID,"Attribute");
}
@Test
public void testToManageInterfaceOperation() {
//interface
- testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Operation_3007, InterfaceOperationCompartmentEditPart.VISUAL_ID);
+ testToManageTopNodeWithMask(UMLElementTypes.Interface_2004, UMLElementTypes.Operation_3007, InterfaceOperationCompartmentEditPart.VISUAL_ID,null);
}
@Test
@@ -174,7 +181,7 @@ public class TestClassDiagramChildLabel extends TestChildLabel {
@Test
public void testToManageClassProperty() {
//Enumeration
- testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Property_3012, ClassAttributeCompartmentEditPart.VISUAL_ID);
+ testToManageTopNodeWithMask(UMLElementTypes.Class_2008, UMLElementTypes.Property_3012, ClassAttributeCompartmentEditPart.VISUAL_ID,"Attribute");
}
@Test
@@ -186,7 +193,7 @@ public class TestClassDiagramChildLabel extends TestChildLabel {
@Test
public void testToManageClassOperation() {
//Enumeration
- testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Operation_3013, ClassOperationCompartmentEditPart.VISUAL_ID);
+ testToManageTopNodeWithMask(UMLElementTypes.Class_2008, UMLElementTypes.Operation_3013, ClassOperationCompartmentEditPart.VISUAL_ID,null);
}
@Test
@@ -240,12 +247,12 @@ public class TestClassDiagramChildLabel extends TestChildLabel {
@Test
public void testToManagePrimitiveTypeProperty() {
//class
- testToManageTopNode(UMLElementTypes.PrimitiveType_2009, UMLElementTypes.Property_3041, PrimitiveTypeAttributeCompartmentEditPart.VISUAL_ID);
+ testToManageTopNodeWithMask(UMLElementTypes.PrimitiveType_2009, UMLElementTypes.Property_3041, PrimitiveTypeAttributeCompartmentEditPart.VISUAL_ID,"Attribute");
}
@Test
public void testToManagePrimitiveTypeOperation() {
//class
- testToManageTopNode(UMLElementTypes.PrimitiveType_2009, UMLElementTypes.Operation_3042, PrimitiveTypeOperationCompartmentEditPart.VISUAL_ID);
+ testToManageTopNodeWithMask(UMLElementTypes.PrimitiveType_2009, UMLElementTypes.Operation_3042, PrimitiveTypeOperationCompartmentEditPart.VISUAL_ID,null);
}
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildNode.java
index e8d1c852b39..8eaa199c9b4 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildNode.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildNode.java
@@ -15,8 +15,11 @@ package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.junit.framework.classification.FailingTest;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
import org.eclipse.papyrus.uml.diagram.tests.canonical.TestChildNode;
@@ -29,11 +32,19 @@ import org.junit.Test;
public class TestClassDiagramChildNode extends TestChildNode {
@Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+ @Override
protected CreateViewRequest createViewRequestShapeContainer() {
return CreateViewRequestFactory.getCreateShapeRequest(UMLElementTypes.Package_2007, getDiagramEditPart().getDiagramPreferencesHint());
}
@Override
+ public boolean isTestAffixedNode() {
+ return true;
+ }
+ @Override
protected String getProjectName() {
return IClassDiagramTestsConstants.PROJECT_NAME;
}
@@ -56,7 +67,7 @@ public class TestClassDiagramChildNode extends TestChildNode {
*/
@Test
public void testToManageComponent() {
- testToManageChildNode(UMLElementTypes.Component_3021, UMLPackage.eINSTANCE.getComponent(), UMLElementTypes.Package_3009, true);
+ testToManageNode(UMLElementTypes.Component_3021, UMLPackage.eINSTANCE.getComponent(), UMLElementTypes.Package_3009, true);
}
/**
@@ -64,7 +75,7 @@ public class TestClassDiagramChildNode extends TestChildNode {
*/
@Test
public void testToManageInstanceSpecification() {
- testToManageChildNode(UMLElementTypes.InstanceSpecification_3020, UMLPackage.eINSTANCE.getInstanceSpecification(), UMLElementTypes.Package_3009, true);
+ testToManageNode(UMLElementTypes.InstanceSpecification_3020, UMLPackage.eINSTANCE.getInstanceSpecification(), UMLElementTypes.Package_3009, true);
}
/**
@@ -72,15 +83,16 @@ public class TestClassDiagramChildNode extends TestChildNode {
*/
@Test
public void testToManageSignal() {
- testToManageChildNode(UMLElementTypes.Signal_3022, UMLPackage.eINSTANCE.getSignal(), UMLElementTypes.Package_3009, true);
+ testToManageNode(UMLElementTypes.Signal_3022, UMLPackage.eINSTANCE.getSignal(), UMLElementTypes.Package_3009, true);
}
/**
* Test to manage model.
*/
@Test
+ @FailingTest
public void testToManageModel() {
- testToManageChildNode(UMLElementTypes.Model_3024, UMLPackage.eINSTANCE.getModel(), UMLElementTypes.Package_3009, true);
+ testToManageNode(UMLElementTypes.Model_3024, UMLPackage.eINSTANCE.getModel(), UMLElementTypes.Package_3009, true);
}
/**
@@ -88,15 +100,16 @@ public class TestClassDiagramChildNode extends TestChildNode {
*/
@Test
public void testToManageEnumeration() {
- testToManageChildNode(UMLElementTypes.Enumeration_3025, UMLPackage.eINSTANCE.getEnumeration(), UMLElementTypes.Package_3009, true);
+ testToManageNode(UMLElementTypes.Enumeration_3025, UMLPackage.eINSTANCE.getEnumeration(), UMLElementTypes.Package_3009, true);
}
/**
* Test to manage i package.
*/
@Test
+ @FailingTest
public void testToManageIPackage() {
- testToManageChildNode(UMLElementTypes.Package_3009, UMLPackage.eINSTANCE.getPackage(), UMLElementTypes.Package_3009, true);
+ testToManageNode(UMLElementTypes.Package_3009, UMLPackage.eINSTANCE.getPackage(), UMLElementTypes.Package_3009, true);
}
/**
@@ -104,7 +117,7 @@ public class TestClassDiagramChildNode extends TestChildNode {
*/
@Test
public void testToManageClass() {
- testToManageChildNode(UMLElementTypes.Class_3010, UMLPackage.eINSTANCE.getClass_(), UMLElementTypes.Package_3009, true);
+ testToManageNode(UMLElementTypes.Class_3010, UMLPackage.eINSTANCE.getClass_(), UMLElementTypes.Package_3009, true);
}
/**
@@ -112,7 +125,7 @@ public class TestClassDiagramChildNode extends TestChildNode {
*/
@Test
public void testToManageInformationItem() {
- testToManageChildNode(UMLElementTypes.InformationItem_3040, UMLPackage.eINSTANCE.getInformationItem(), UMLElementTypes.Package_3009, true);
+ testToManageNode(UMLElementTypes.InformationItem_3040, UMLPackage.eINSTANCE.getInformationItem(), UMLElementTypes.Package_3009, true);
}
/**
@@ -120,7 +133,7 @@ public class TestClassDiagramChildNode extends TestChildNode {
*/
@Test
public void testToManagePrimitiveType() {
- testToManageChildNode(UMLElementTypes.PrimitiveType_3026, UMLPackage.eINSTANCE.getPrimitiveType(), UMLElementTypes.Package_3009, true);
+ testToManageNode(UMLElementTypes.PrimitiveType_3026, UMLPackage.eINSTANCE.getPrimitiveType(), UMLElementTypes.Package_3009, true);
}
/**
@@ -128,7 +141,7 @@ public class TestClassDiagramChildNode extends TestChildNode {
*/
@Test
public void testToManageDataType() {
- testToManageChildNode(UMLElementTypes.DataType_3027, UMLPackage.eINSTANCE.getDataType(), UMLElementTypes.Package_3009, true);
+ testToManageNode(UMLElementTypes.DataType_3027, UMLPackage.eINSTANCE.getDataType(), UMLElementTypes.Package_3009, true);
}
/**
@@ -136,7 +149,7 @@ public class TestClassDiagramChildNode extends TestChildNode {
*/
@Test
public void testToManageConstraint() {
- testToManageChildNode(UMLElementTypes.Constraint_3029, UMLPackage.eINSTANCE.getConstraint(), UMLElementTypes.Package_3009, true);
+ testToManageNode(UMLElementTypes.Constraint_3029, UMLPackage.eINSTANCE.getConstraint(), UMLElementTypes.Package_3009, true);
}
/**
@@ -144,9 +157,16 @@ public class TestClassDiagramChildNode extends TestChildNode {
*/
@Test
public void testToManageComment() {
- testToManageChildNode(UMLElementTypes.Comment_3028, UMLPackage.eINSTANCE.getComment(), UMLElementTypes.Package_3009, true);
+ testToManageNode(UMLElementTypes.Comment_3028, UMLPackage.eINSTANCE.getComment(), UMLElementTypes.Package_3009, true);
}
+ /**
+ * Test to manage comment.
+ */
+ @Test
+ public void testToManageInterface() {
+ testToManageNode(UMLElementTypes.Interface_3023, UMLPackage.eINSTANCE.getInterface(), UMLElementTypes.Package_3009, true);
+ }
@Override
protected ICreationCommand getDiagramCommandCreation() {
return new CreateClassDiagramCommand();
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramContainment.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramContainment.java
index 98bda5c2338..2cfdc8ed869 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramContainment.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramContainment.java
@@ -13,8 +13,10 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
import org.eclipse.papyrus.uml.diagram.tests.canonical.TestContainmentLink;
@@ -23,6 +25,10 @@ import org.junit.Test;
public class TestClassDiagramContainment extends TestContainmentLink {
@Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+ @Override
protected ICreationCommand getDiagramCommandCreation() {
return new CreateClassDiagramCommand();
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLink.java
index c8f0a4b20fd..b80d8c0dd48 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLink.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLink.java
@@ -13,8 +13,11 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.junit.framework.classification.FailingTest;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
import org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink;
@@ -26,6 +29,10 @@ import org.junit.Test;
public class TestClassDiagramLink extends TestLink {
@Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+ @Override
protected ICreationCommand getDiagramCommandCreation() {
return new CreateClassDiagramCommand();
}
@@ -44,6 +51,7 @@ public class TestClassDiagramLink extends TestLink {
* Test to manage component.
*/
@Test
+ @FailingTest
public void testToManageDependency() {
testToManageLink(UMLElementTypes.Component_2002, UMLElementTypes.Component_2002, UMLElementTypes.Dependency_4008, UMLElementTypes.Package_2007, true);
}
@@ -52,8 +60,9 @@ public class TestClassDiagramLink extends TestLink {
* Test to manage Association.
*/
@Test
+ @FailingTest
public void testToManageAssociation() {
- testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Association_4001, UMLElementTypes.Package_2007, true);
+ testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Association_4001, UMLElementTypes.Package_2007, true,"srcMulA_cla");
}
//test generatlization
@@ -63,6 +72,7 @@ public class TestClassDiagramLink extends TestLink {
* Test to manage Realization
*/
@Test
+ @FailingTest
public void testToManageRealization() {
testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Realization_4005, UMLElementTypes.Package_2007, true);
}
@@ -71,6 +81,7 @@ public class TestClassDiagramLink extends TestLink {
* Test to manage Abstraction
*/
@Test
+ @FailingTest
public void testToManageAbstraction() {
testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Abstraction_4006, UMLElementTypes.Package_2007, true);
}
@@ -79,6 +90,7 @@ public class TestClassDiagramLink extends TestLink {
* Test to manage Usage
*/
@Test
+ @FailingTest
public void testToManageUsage() {
testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Usage_4007, UMLElementTypes.Package_2007, true);
}
@@ -87,6 +99,7 @@ public class TestClassDiagramLink extends TestLink {
* Test to manage Usage
*/
@Test
+ @FailingTest
public void testToManageInformationFlow() {
testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.InformationFlow_4026, UMLElementTypes.Package_2007, true);
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLinkOwnedBySource.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLinkOwnedBySource.java
index 4e4a6fb946f..012629d8026 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLinkOwnedBySource.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLinkOwnedBySource.java
@@ -13,8 +13,10 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
import org.eclipse.papyrus.uml.diagram.tests.canonical.TestLinkOwnedBySource;
@@ -26,6 +28,10 @@ import org.junit.Test;
public class TestClassDiagramLinkOwnedBySource extends TestLinkOwnedBySource {
@Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+ @Override
protected ICreationCommand getDiagramCommandCreation() {
return new CreateClassDiagramCommand();
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramTopNode.java
index d4a726b98d0..f641deeb2c8 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramTopNode.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramTopNode.java
@@ -15,8 +15,10 @@ package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
import org.eclipse.papyrus.uml.diagram.tests.canonical.TestTopNode;
@@ -29,10 +31,13 @@ import org.junit.Test;
public class TestClassDiagramTopNode extends TestTopNode {
@Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+ @Override
protected ICreationCommand getDiagramCommandCreation() {
return new CreateClassDiagramCommand();
}
-
@Override
protected String getProjectName() {
return IClassDiagramTestsConstants.PROJECT_NAME;
@@ -138,6 +143,31 @@ public class TestClassDiagramTopNode extends TestTopNode {
public void testToManageInformationItem() {
testToManageNode(UMLElementTypes.InformationItem_2099, UMLPackage.eINSTANCE.getInformationItem(), UMLElementTypes.Package_2007, true);
}
+
+ /**
+ * Test to manage component.
+ */
+ @Test
+ public void testToManageInterface() {
+ testToManageNode(UMLElementTypes.Interface_2004, UMLPackage.eINSTANCE.getInterface(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage component.
+ */
+ @Test
+ public void testToManageTimeObservation() {
+ testToManageNode(UMLElementTypes.TimeObservation_2096, UMLPackage.eINSTANCE.getTimeObservation(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage component.
+ */
+ @Test
+ public void testToManageDurationObservation() {
+ testToManageNode(UMLElementTypes.DurationObservation_2095, UMLPackage.eINSTANCE.getDurationObservation(), UMLElementTypes.Package_2007, true);
+ }
+
/**
* {@inheritDoc}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestDropfunction.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestDropfunction.java
index 79b25e3f465..a8b509528a7 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestDropfunction.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestDropfunction.java
@@ -32,8 +32,10 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEnumerationLiteralCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
@@ -50,6 +52,10 @@ import org.junit.Test;
public class TestDropfunction extends TestChildLabel {
@Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+ @Override
protected ICreationCommand getDiagramCommandCreation() {
return new CreateClassDiagramCommand();
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestEditableClassDiagramTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestEditableClassDiagramTopNode.java
index 8354fcb7891..6b197a37520 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestEditableClassDiagramTopNode.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestEditableClassDiagramTopNode.java
@@ -18,6 +18,7 @@ import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.edition.EditableNodeTest;
import org.junit.Test;
/**
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java
index 4ccad3cebf8..ea0ab10e209 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java
@@ -26,9 +26,11 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
import org.eclipse.gmf.runtime.draw2d.ui.text.TextFlowEx;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomUMLDiagramUpdater;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassAttributeCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassOperationCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -46,6 +48,10 @@ import org.junit.Test;
public class TestStaticFeatureRepresentation extends TestChildLabel {
@Override
+ public DiagramUpdater getDiagramUpdater() {
+ return CustomUMLDiagramUpdater.INSTANCE;
+ }
+ @Override
protected ICreationCommand getDiagramCommandCreation() {
return new CreateClassDiagramCommand();
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/legacy/PackageDiagramLegacyTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/legacy/PackageDiagramLegacyTest.java
index c2f6fe29fb6..656f3a1de4f 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/legacy/PackageDiagramLegacyTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/legacy/PackageDiagramLegacyTest.java
@@ -20,6 +20,7 @@ import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.uml.diagram.clazz.UmlClassDiagramForMultiEditor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/META-INF/MANIFEST.MF
index 2323709a04d..47f0751d3a3 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/META-INF/MANIFEST.MF
@@ -17,7 +17,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0"
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/css/Bug431694_UndoDeleteTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/css/Bug431694_UndoDeleteTest.java
index ad9503a5048..9c6eea30fdc 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/css/Bug431694_UndoDeleteTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/css/Bug431694_UndoDeleteTest.java
@@ -26,8 +26,9 @@ import org.eclipse.gmf.runtime.notation.GradientStyle;
import org.eclipse.gmf.runtime.notation.Shape;
import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper;
+import org.eclipse.papyrus.junit.utils.DiagramUtils;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
import org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase;
import org.eclipse.swt.widgets.Display;
import org.eclipse.uml2.uml.Package;
@@ -150,7 +151,7 @@ public class Bug431694_UndoDeleteTest extends AbstractEditorTest {
// default style: papyrus theme
Assert.assertEquals("Invalid Fill color (Default): " + DiagramUtils.integerToRGBString(classNamedStyleFontView.getFillColor()), DiagramUtils.rgb(195, 215, 221), classNamedStyleFontView.getFillColor()); // Papyrus Theme =
Assert.assertEquals("Gradient should be default (vertical)", classNamedStyleFontView.getGradient().getGradientStyle(), GradientStyle.VERTICAL); // Papyrus Theme =
- Assert.assertEquals("Invalid Gradient Color (Default)", DiagramUtils.rgb(255, 255, 255), classNamedStyleFontView.getGradient().getGradientColor1()); // Papyrus Theme =
+ Assert.assertEquals("Invalid Gradient Color (Default)", DiagramUtils.rgb(255, 255, 255), classNamedStyleFontView.getGradient().getGradientColor1()); // Papyrus Theme =
// named style: font color is white
Assert.assertEquals("Invalid Font Color", DiagramUtils.rgb(255, 255, 255), classNamedStyleFontView.getFontColor()); // White font by the named style
@@ -184,6 +185,7 @@ public class Bug431694_UndoDeleteTest extends AbstractEditorTest {
protected void executeOnUIThread(final Command command) {
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
execute(command);
}
@@ -194,6 +196,7 @@ public class Bug431694_UndoDeleteTest extends AbstractEditorTest {
protected void undoOnUIThread() {
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
undo();
}
@@ -204,6 +207,7 @@ public class Bug431694_UndoDeleteTest extends AbstractEditorTest {
protected void redoOnUIThread() {
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
redo();
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/CommonBendpointsTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/CommonBendpointsTest.java
index d7a33a21b41..37c8f1c05e8 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/CommonBendpointsTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/src/org/eclipse/papyrus/uml/diagram/common/tests/tests/CommonBendpointsTest.java
@@ -31,6 +31,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.edge.PapyrusEdgeFigure;
import org.eclipse.papyrus.infra.widgets.util.IRevealSemanticElement;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
import org.eclipse.papyrus.uml.diagram.common.tests.Activator;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.PlatformUI;
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/META-INF/MANIFEST.MF
index 52a3e959a73..04b62125568 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
org.junit;bundle-version="4.10.0",
org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime
+ org.eclipse.gmf.tooling.runtime,
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/build.properties
index 0c7771957fe..1b08f841b5e 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/build.properties
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests/build.properties
@@ -4,5 +4,4 @@ bin.includes = META-INF/,\
.,\
about.html,\
plugin.properties
-src.includes = about.html,\
- plugin.properties
+src.includes = about.html
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/META-INF/MANIFEST.MF
index 3ff7e4d5e14..525c82ff479 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests/META-INF/MANIFEST.MF
@@ -14,7 +14,8 @@ Require-Bundle: org.eclipse.ui,
org.junit;bundle-version="4.10.0",
org.eclipse.papyrus.uml.diagram.component;bundle-version="1.0.0",
org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime
+ org.eclipse.gmf.tooling.runtime,
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.uml.diagram.component.test,
org.eclipse.papyrus.uml.diagram.component.test.canonical,
org.eclipse.papyrus.uml.diagram.component.test.load
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/META-INF/MANIFEST.MF
index 86000e64e82..367b85580ad 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/META-INF/MANIFEST.MF
@@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
org.junit;bundle-version="4.10.0",
org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime
+ org.eclipse.gmf.tooling.runtime,
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/META-INF/MANIFEST.MF
index 99cc21ffe53..3fd23ba3a59 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests/META-INF/MANIFEST.MF
@@ -14,7 +14,8 @@ Require-Bundle: org.eclipse.ui,
org.junit;bundle-version="4.10.0",
org.eclipse.papyrus.uml.diagram.deployment;bundle-version="1.0.0",
org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime
+ org.eclipse.gmf.tooling.runtime,
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.uml.diagram.deployment.test,
org.eclipse.papyrus.uml.diagram.deployment.test.canonical,
org.eclipse.papyrus.uml.diagram.deployment.test.load
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/META-INF/MANIFEST.MF
index ec328baa6c1..03f0d8a3adb 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/META-INF/MANIFEST.MF
@@ -16,7 +16,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui.ide;bundle-version="3.8.0",
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.uml.diagram.dnd.tests.tests
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/src/org/eclipse/papyrus/uml/diagram/dnd/tests/tests/InstanceSpecificationTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/src/org/eclipse/papyrus/uml/diagram/dnd/tests/tests/InstanceSpecificationTest.java
index 5b1c9a6dea6..69abb4691b6 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/src/org/eclipse/papyrus/uml/diagram/dnd/tests/tests/InstanceSpecificationTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests/src/org/eclipse/papyrus/uml/diagram/dnd/tests/tests/InstanceSpecificationTest.java
@@ -39,6 +39,7 @@ import org.eclipse.papyrus.infra.widgets.providers.EncapsulatedContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.TreeToFlatContentProvider;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
import org.eclipse.papyrus.uml.diagram.dnd.strategy.instancespecification.ui.ClassifierPropertiesContentProvider;
import org.eclipse.papyrus.uml.diagram.dnd.tests.Activator;
import org.eclipse.papyrus.uml.tools.utils.UMLUtil;
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests/META-INF/MANIFEST.MF
index 62756271092..95f5f154713 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests/META-INF/MANIFEST.MF
@@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.gmf.runtime.diagram.ui,
org.junit;bundle-version="4.10.0",
org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime
+ org.eclipse.gmf.tooling.runtime,
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.uml.diagram.interactionoverview.te
sts
Bundle-Vendor: Eclipse Modeling Project
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/META-INF/MANIFEST.MF
index 8b1d7954ffe..46465e2337b 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/META-INF/MANIFEST.MF
@@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
org.junit;bundle-version="4.10.0",
org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime
+ org.eclipse.gmf.tooling.runtime,
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.papyrus.uml.diagram.profile.tests
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF
index 74b21bc7000..610a2475076 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.0.0",
org.eclipse.papyrus.uml.appearance;bundle-version="1.0.0",
org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.framework;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.uml.diagram.sequence.tests
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/AllTests.java
index c43c862d8d8..48feac10d73 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/AllTests.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/AllTests.java
@@ -14,6 +14,7 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.tests;
+import org.eclipse.papyrus.junit.utils.rules.HideViewRule;
import org.eclipse.papyrus.uml.diagram.sequence.tests.bug.BugTests;
import org.eclipse.papyrus.uml.diagram.sequence.tests.bug.BugTests2;
import org.eclipse.papyrus.uml.diagram.sequence.tests.bug.m7.BugTest_m7;
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/PopupUtil.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/PopupUtil.java
index 57b73299ac5..25dc7632579 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/PopupUtil.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/PopupUtil.java
@@ -17,6 +17,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.tests.bug;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.papyrus.junit.utils.rules.AbstractHouseKeeperRule;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/pro20130916/Fixbug_LifelineManagement_417365.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/pro20130916/Fixbug_LifelineManagement_417365.java
index 7dbfccbd687..25346606982 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/pro20130916/Fixbug_LifelineManagement_417365.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/pro20130916/Fixbug_LifelineManagement_417365.java
@@ -31,6 +31,8 @@ import org.eclipse.gmf.runtime.diagram.core.commands.SetPropertyCommand;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.papyrus.junit.framework.classification.InvalidTest;
+import org.eclipse.papyrus.junit.utils.rules.RuleUtil;
+import org.eclipse.papyrus.junit.utils.rules.ShowViewRule;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractExecutionSpecificationEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.AbstractMessageEditPart;
import org.eclipse.papyrus.uml.diagram.sequence.edit.parts.CombinedFragmentCombinedFragmentCompartmentEditPart;
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/META-INF/MANIFEST.MF
index 7565ad260e6..4218a6c3407 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",