blob: 5695663af16791b7b211eb4154d724572d38a694 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/*****************************************************************************
* 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.eclipse.papyrus.uml.service.types.element.UMLDIElementTypes;
import org.junit.Test;
public class TestMultiLink extends AbstractTestMultiLink {
@Override
protected CreateViewRequest createViewRequestShapeContainer() {
return CreateViewRequestFactory.getCreateShapeRequest(UMLElementTypes.Class_Shape, 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_Edge, UMLElementTypes.Dependency_BranchEdge, true);
}
/**
* Test to manage multiassociation.
*/
@Test
public void testToManageMultiAssociation() {
testToManageMultiLink(UMLDIElementTypes.ASSOCIATION_NON_DIRECTED_EDGE, UMLElementTypes.Association_BranchEdge, false);
}
@Override
protected ICreationCommand getDiagramCommandCreation() {
return new CreateClassDiagramCommand();
}
}
|