Skip to content

Package: VTControlLabelAlignmentStylePropertyImpl_Test

VTControlLabelAlignmentStylePropertyImpl_Test

nameinstructionbranchcomplexitylinemethod
VTControlLabelAlignmentStylePropertyImpl_Test()
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%
testOtherDifferent()
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 9
100%
M: 0 C: 1
100%
testOtherNull()
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
testOtherSame()
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 9
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2017 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.template.style.alignment.model.impl;
15:
16: import static org.junit.Assert.assertFalse;
17: import static org.junit.Assert.assertTrue;
18:
19: import org.eclipse.emf.ecp.view.template.style.alignment.model.AlignmentType;
20: import org.eclipse.emf.ecp.view.template.style.alignment.model.VTAlignmentFactory;
21: import org.eclipse.emf.ecp.view.template.style.alignment.model.VTControlLabelAlignmentStyleProperty;
22: import org.junit.Test;
23:
24: public class VTControlLabelAlignmentStylePropertyImpl_Test {
25:
26:         @Test
27:         public void testOtherNull() {
28:                 /* setup */
29:                 final VTControlLabelAlignmentStyleProperty mine = VTAlignmentFactory.eINSTANCE
30:                         .createControlLabelAlignmentStyleProperty();
31:
32:                 /* act */
33:                 final boolean equalStyles = mine.equalStyles(null);
34:
35:                 /* assert */
36:                 assertFalse(equalStyles);
37:         }
38:
39:         @Test
40:         public void testOtherDifferent() {
41:                 /* setup */
42:                 final VTControlLabelAlignmentStyleProperty mine = VTAlignmentFactory.eINSTANCE
43:                         .createControlLabelAlignmentStyleProperty();
44:                 mine.setType(AlignmentType.LEFT);
45:
46:                 final VTControlLabelAlignmentStyleProperty other = VTAlignmentFactory.eINSTANCE
47:                         .createControlLabelAlignmentStyleProperty();
48:                 other.setType(AlignmentType.RIGHT);
49:
50:                 /* act */
51:                 final boolean equalStyles = mine.equalStyles(other);
52:
53:                 /* assert */
54:                 assertFalse(equalStyles);
55:         }
56:
57:         @Test
58:         public void testOtherSame() {
59:                 /* setup */
60:                 final VTControlLabelAlignmentStyleProperty mine = VTAlignmentFactory.eINSTANCE
61:                         .createControlLabelAlignmentStyleProperty();
62:                 mine.setType(AlignmentType.LEFT);
63:
64:                 final VTControlLabelAlignmentStyleProperty other = VTAlignmentFactory.eINSTANCE
65:                         .createControlLabelAlignmentStyleProperty();
66:                 other.setType(AlignmentType.LEFT);
67:
68:                 /* act */
69:                 final boolean equalStyles = mine.equalStyles(other);
70:
71:                 /* assert */
72:                 assertTrue(equalStyles);
73:         }
74:
75: }