Skip to content

Package: ReadOnlyColumnConfiguration_PTest

ReadOnlyColumnConfiguration_PTest

nameinstructionbranchcomplexitylinemethod
ReadOnlyColumnConfiguration_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: 50
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 12
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2015 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: * jfaltermeier - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.edapt.test._160to1170;
15:
16: import static org.junit.Assert.assertFalse;
17: import static org.junit.Assert.assertSame;
18:
19: import org.eclipse.emf.ecp.view.edapt.test.AbstractMigrationTest;
20: import org.eclipse.emf.ecp.view.spi.model.VDomainModelReference;
21: import org.eclipse.emf.ecp.view.spi.model.VView;
22: import org.eclipse.emf.ecp.view.spi.table.model.VReadOnlyColumnConfiguration;
23: import org.eclipse.emf.ecp.view.spi.table.model.VTableControl;
24: import org.eclipse.emf.ecp.view.spi.table.model.VTableDomainModelReference;
25:
26: public class ReadOnlyColumnConfiguration_PTest extends AbstractMigrationTest {
27:
28:         @Override
29:         // BEGIN SUPRESS CATCH EXCEPTION
30:         protected void performTest() throws Exception {// END SUPRESS CATCH EXCEPTION
31:                 assertFalse(getMigrator().checkMigration(getURI()));
32:                 getMigrator().performMigration(getURI());
33:                 final VView view = getMigratedView();
34:                 final VTableControl tableControl = VTableControl.class.cast(view.getChildren().get(0));
35:                 final VReadOnlyColumnConfiguration columnConfiguration = VReadOnlyColumnConfiguration.class
36:                         .cast(tableControl.getColumnConfigurations().get(0));
37:                 final VDomainModelReference reference = columnConfiguration.getColumnDomainReferences().get(0);
38:                 final VDomainModelReference expectedReference = VTableDomainModelReference.class
39:                         .cast(tableControl.getDomainModelReference()).getColumnDomainModelReferences()
40:                         .get(0);
41:                 assertSame(expectedReference, reference);
42:         }
43:
44:         @Override
45:         protected String getPath() {
46:                 return "160/League.view";
47:         }
48:
49: }