Skip to content

Package: TooltipMIgration_PTest

TooltipMIgration_PTest

nameinstructionbranchcomplexitylinemethod
TooltipMIgration_PTest()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
assertTooltip(String, Object)
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getPath()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
performTest()
M: 0 C: 55
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 10
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2019 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Johannes Faltermeier - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.edapt.test._1160to1200;
15:
16: import static org.junit.Assert.assertEquals;
17: import static org.junit.Assert.assertFalse;
18:
19: import org.eclipse.emf.ecp.view.edapt.test.AbstractMigrationTest;
20: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizationElement;
21: import org.eclipse.emf.ecp.view.spi.model.VHasTooltip;
22: import org.eclipse.emf.ecp.view.spi.model.VView;
23: import org.eclipse.emf.ecp.view.spi.section.model.VSectionedArea;
24:
25: public class TooltipMIgration_PTest extends AbstractMigrationTest {
26:
27:         @Override
28:         // BEGIN SUPRESS CATCH EXCEPTION
29:         protected void performTest() throws Exception {// END SUPRESS CATCH EXCEPTION
30:                 assertFalse(getMigrator().checkMigration(getURI()));
31:                 getMigrator().performMigration(getURI());
32:                 final VView view = getMigratedView();
33:                 assertTooltip("Group Tooltip", view.getChildren().get(0));
34:                 assertTooltip("Composite Category Tooltip",
35:                         VCategorizationElement.class.cast(view.getChildren().get(1)).getCategorizations().get(0));
36:                 assertTooltip("Leaf Category Tooltip",
37:                         VCategorizationElement.class.cast(view.getChildren().get(1)).getCategorizations().get(1));
38:                 assertTooltip("Section Tooltip", VSectionedArea.class.cast(view.getChildren().get(2)).getRoot());
39:         }
40:
41:         private static void assertTooltip(String expected, Object hasTooltip) {
42:                 assertEquals(expected, VHasTooltip.class.cast(hasTooltip).getTooltip());
43:         }
44:
45:         @Override
46:         protected String getPath() {
47:                 return "1160/PlayerTooltip.view";
48:         }
49: }