Skip to content

Package: VTReferenceStylePropertyImpl_Test

VTReferenceStylePropertyImpl_Test

nameinstructionbranchcomplexitylinemethod
VTReferenceStylePropertyImpl_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%
defaultValues()
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
equalStyles_OtherNull()
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
equalStyles_otherDifferent()
M: 0 C: 14
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
equalStyles_otherEqual()
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
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: * Lucas Koehler - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.template.style.reference.model.impl;
15:
16: import static org.junit.Assert.assertEquals;
17: import static org.junit.Assert.assertFalse;
18: import static org.junit.Assert.assertTrue;
19:
20: import org.eclipse.emf.ecp.view.template.style.mandatory.model.VTMandatoryFactory;
21: import org.eclipse.emf.ecp.view.template.style.mandatory.model.VTMandatoryStyleProperty;
22: import org.eclipse.emf.ecp.view.template.style.reference.model.VTReferenceFactory;
23: import org.eclipse.emf.ecp.view.template.style.reference.model.VTReferenceStyleProperty;
24: import org.junit.Test;
25:
26: /**
27: * Unit tests for {@link VTReferenceStylePropertyImpl}.
28: *
29: * @author Lucas Koehler
30: *
31: */
32: public class VTReferenceStylePropertyImpl_Test {
33:
34:         @Test
35:         public void defaultValues() {
36:                 final VTReferenceStyleProperty property = VTReferenceFactory.eINSTANCE.createReferenceStyleProperty();
37:                 assertEquals(true, property.isShowCreateAndLinkButtonForCrossReferences());
38:         }
39:
40:         @Test
41:         public void equalStyles_otherEqual() {
42:                 final VTReferenceStyleProperty property1 = VTReferenceFactory.eINSTANCE.createReferenceStyleProperty();
43:                 final VTReferenceStyleProperty property2 = VTReferenceFactory.eINSTANCE.createReferenceStyleProperty();
44:
45:                 assertTrue(property1.equalStyles(property2));
46:         }
47:
48:         @Test
49:         public void equalStyles_otherDifferent() {
50:                 final VTReferenceStyleProperty property1 = VTReferenceFactory.eINSTANCE.createReferenceStyleProperty();
51:                 final VTReferenceStyleProperty property2 = VTReferenceFactory.eINSTANCE.createReferenceStyleProperty();
52:                 property2.setShowCreateAndLinkButtonForCrossReferences(false);
53:
54:                 assertFalse(property1.equalStyles(property2));
55:
56:         }
57:
58:         @Test
59:         public void equalStyles_OtherNull() {
60:                 final VTMandatoryStyleProperty mandatoryStyleProperty = VTMandatoryFactory.eINSTANCE
61:                         .createMandatoryStyleProperty();
62:
63:                 assertFalse(mandatoryStyleProperty.equalStyles(null));
64:         }
65: }