Skip to main content
summaryrefslogtreecommitdiffstats
blob: f56738ee03911782eba255311081d8193c5d6b36 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*****************************************************************************
 * 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.usecase.tests.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.diagram.tests.canonical.TestChildNode;
import org.eclipse.papyrus.uml.diagram.usecase.CreateUseCaseDiagramCommand;
import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
import org.eclipse.uml2.uml.UMLPackage;
import org.junit.Test;


// TODO: Auto-generated Javadoc
/**
 * The Class TestUseCaseChildNodeForPackage.
 */
public class TestUseCaseChildNodeForPackage extends TestChildNode {

	
	@Override
	protected CreateViewRequest createViewRequestShapeContainer() {
		return CreateViewRequestFactory.getCreateShapeRequest(UMLElementTypes.Package_2016, getDiagramEditPart().getDiagramPreferencesHint());
	}
	
	/**
	 * Test to manage component.
	 */
	@Test
	public void testToManagePackage() {
		testToManageNode(UMLElementTypes.Package_3014, UMLPackage.eINSTANCE.getPackage(), UMLElementTypes.Package_3014, true);
	}
	
	/**
	 * Test to manage component.
	 */
	@Test
	public void testToManageActor() {
		testToManageNode(UMLElementTypes.Actor_3011, UMLPackage.eINSTANCE.getActor(), UMLElementTypes.Package_3014, true);
	}
	
	/**
	 * Test to manage component.
	 */
	@Test
	public void testToManageComment() {
		testToManageNode(UMLElementTypes.Comment_3015, UMLPackage.eINSTANCE.getComment(), UMLElementTypes.Package_3014, true);
	}
	/**
	 * Test to manage component.
	 */
	@Test
	public void testToManageConstraint() {
		testToManageNode(UMLElementTypes.Constraint_3010, UMLPackage.eINSTANCE.getConstraint(), UMLElementTypes.Package_3014, true);
	}
	@Test
	public void testToManageComponent() {
		testToManageNode(UMLElementTypes.Component_3013, UMLPackage.eINSTANCE.getComponent(), UMLElementTypes.Package_3014, true);
	}
	@Test
	public void testToManageUseCase() {
		testToManageNode(UMLElementTypes.UseCase_3012, UMLPackage.eINSTANCE.getUseCase(), UMLElementTypes.Package_3014, true);
	}
	
	@Override
	protected ICreationCommand getDiagramCommandCreation() {
		return  new CreateUseCaseDiagramCommand();
	}
	
}

Back to the top