Skip to content

Package: CompareTypeMigration_PTest

CompareTypeMigration_PTest

nameinstructionbranchcomplexitylinemethod
CompareTypeMigration_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%
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: 33
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
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.model.VView;
21: import org.eclipse.emf.ecp.view.spi.rule.model.CompareType;
22: import org.eclipse.emf.ecp.view.spi.rule.model.LeafCondition;
23: import org.eclipse.emf.ecp.view.spi.rule.model.ShowRule;
24:
25: public class CompareTypeMigration_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:                 final ShowRule rule = (ShowRule) view.getChildren().get(0).getAttachments().get(0);
34:                 final LeafCondition leafCondition = (LeafCondition) rule.getCondition();
35:                 assertEquals(CompareType.NOT_EQUALS, leafCondition.getCompareType());
36:         }
37:
38:         @Override
39:         protected String getPath() {
40:                 return "1160/Player.view";
41:         }
42: }