Skip to content

Package: FalseCondition_PTest

FalseCondition_PTest

nameinstructionbranchcomplexitylinemethod
FalseCondition_PTest()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
createCondition()
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%
evaluate()
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
references()
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
settings()
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2017 Christian W. Damus 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: * Christian W. Damus - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.rule.test;
15:
16: import static org.hamcrest.CoreMatchers.any;
17: import static org.hamcrest.CoreMatchers.hasItem;
18: import static org.hamcrest.CoreMatchers.is;
19: import static org.hamcrest.CoreMatchers.not;
20: import static org.hamcrest.MatcherAssert.assertThat;
21:
22: import org.eclipse.emf.ecp.common.spi.UniqueSetting;
23: import org.eclipse.emf.ecp.view.spi.model.VDomainModelReference;
24: import org.eclipse.emf.ecp.view.spi.rule.model.False;
25: import org.eclipse.emf.ecp.view.spi.rule.model.RuleFactory;
26: import org.junit.Test;
27:
28: /**
29: * Test the {@link False} condition and its service.
30: *
31: * @author Christian W. Damus
32: */
33: public class FalseCondition_PTest extends AbstractConditionTest<False> {
34:
35:         /**
36:          * Initializes me.
37:          */
38:         public FalseCondition_PTest() {
39:                 super();
40:         }
41:
42:         @Test
43:         public void evaluate() {
44:                 assertThat(evaluate(getModel()), is(false));
45:         }
46:
47:         @Test
48:         public void settings() {
49:                 assertThat(getConditionSettings(getModel()), not(hasItem(any(UniqueSetting.class))));
50:         }
51:
52:         @Test
53:         public void references() {
54:                 assertThat(getDomainModelReferences(), not(hasItem(any(VDomainModelReference.class))));
55:         }
56:
57:         //
58:         // Test framework
59:         //
60:
61:         @Override
62:         protected False createCondition() {
63:                 return RuleFactory.eINSTANCE.createFalse();
64:         }
65: }