Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0b9d10506c935e8bd28cc22499550922d289ba52 (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
/*****************************************************************************
 * 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.diagram.clazz.test.canonical;

import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.diagram.tests.canonical.TestLinkOwnedBySource;
import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
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
	protected ICreationCommand getDiagramCommandCreation() {
		return  new CreateClassDiagramCommand();
	}
	
	/**
	 * 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
	
}

Back to the top