Skip to content

Package: VTLabelWrapStylePropertyImpl_Test

VTLabelWrapStylePropertyImpl_Test

nameinstructionbranchcomplexitylinemethod
VTLabelWrapStylePropertyImpl_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%
equalStyle_differentProperty()
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
equalStyle_false1()
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
equalStyle_false2()
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
equalStyle_null()
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
equalStyle_true1()
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
equalStyle_true2()
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
property(boolean)
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2018 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.wrap.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.labelwidth.model.VTLabelwidthFactory;
20: import org.eclipse.emf.ecp.view.template.style.wrap.model.VTLabelWrapStyleProperty;
21: import org.eclipse.emf.ecp.view.template.style.wrap.model.VTWrapFactory;
22: import org.junit.Test;
23:
24: public class VTLabelWrapStylePropertyImpl_Test {
25:
26:         private static VTLabelWrapStyleProperty property(boolean isWrap) {
27:                 final VTLabelWrapStyleProperty property = VTWrapFactory.eINSTANCE.createLabelWrapStyleProperty();
28:                 property.setWrapLabel(isWrap);
29:                 return property;
30:         }
31:
32:         @Test
33:         public void equalStyle_null() {
34:                 /* setup */
35:                 final VTLabelWrapStyleProperty underTest = property(true);
36:
37:                 /* act */
38:                 final boolean equalStyles = underTest.equalStyles(null);
39:
40:                 /* assert */
41:                 assertFalse(equalStyles);
42:         }
43:
44:         @Test
45:         public void equalStyle_differentProperty() {
46:                 /* setup */
47:                 final VTLabelWrapStyleProperty underTest = property(true);
48:
49:                 /* act */
50:                 final boolean equalStyles = underTest
51:                         .equalStyles(VTLabelwidthFactory.eINSTANCE.createLabelWidthStyleProperty());
52:
53:                 /* assert */
54:                 assertFalse(equalStyles);
55:         }
56:
57:         @Test
58:         public void equalStyle_false1() {
59:                 /* setup */
60:                 final VTLabelWrapStyleProperty underTest = property(true);
61:
62:                 /* act */
63:                 final boolean equalStyles = underTest
64:                         .equalStyles(property(false));
65:
66:                 /* assert */
67:                 assertFalse(equalStyles);
68:         }
69:
70:         @Test
71:         public void equalStyle_false2() {
72:                 /* setup */
73:                 final VTLabelWrapStyleProperty underTest = property(false);
74:
75:                 /* act */
76:                 final boolean equalStyles = underTest
77:                         .equalStyles(property(true));
78:
79:                 /* assert */
80:                 assertFalse(equalStyles);
81:         }
82:
83:         @Test
84:         public void equalStyle_true1() {
85:                 /* setup */
86:                 final VTLabelWrapStyleProperty underTest = property(true);
87:
88:                 /* act */
89:                 final boolean equalStyles = underTest
90:                         .equalStyles(property(true));
91:
92:                 /* assert */
93:                 assertTrue(equalStyles);
94:         }
95:
96:         @Test
97:         public void equalStyle_true2() {
98:                 /* setup */
99:                 final VTLabelWrapStyleProperty underTest = property(false);
100:
101:                 /* act */
102:                 final boolean equalStyles = underTest
103:                         .equalStyles(property(false));
104:
105:                 /* assert */
106:                 assertTrue(equalStyles);
107:         }
108:
109: }