Skip to content

Package: EMFFormsDMRExpanderDefaultHeuristic_ITest

EMFFormsDMRExpanderDefaultHeuristic_ITest

nameinstructionbranchcomplexitylinemethod
EMFFormsDMRExpanderDefaultHeuristic_ITest()
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%
setUp()
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
setUpBeforeClass()
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
tearDown()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
testServiceType()
M: 0 C: 6
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) 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: * Lucas Koehler - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.internal.core.services.domainexpander.defaultheuristic;
15:
16: import static org.junit.Assert.assertTrue;
17:
18: import org.eclipse.emfforms.spi.core.services.domainexpander.EMFFormsDMRExpander;
19: import org.junit.After;
20: import org.junit.Before;
21: import org.junit.BeforeClass;
22: import org.junit.Test;
23: import org.osgi.framework.BundleContext;
24: import org.osgi.framework.FrameworkUtil;
25: import org.osgi.framework.ServiceReference;
26:
27: /**
28: * JUnit integration tests for the {@link EMFFormsDMRExpanderDefaultHeuristic}.
29: *
30: * @author Lucas Koehler
31: *
32: */
33: public class EMFFormsDMRExpanderDefaultHeuristic_ITest {
34:
35:         private static BundleContext bundleContext;
36:         private ServiceReference<EMFFormsDMRExpander> serviceReference;
37:         private EMFFormsDMRExpander service;
38:
39:         @BeforeClass
40:         public static void setUpBeforeClass() {
41:                 bundleContext = FrameworkUtil.getBundle(EMFFormsDMRExpanderDefaultHeuristic_ITest.class).getBundleContext();
42:
43:         }
44:
45:         @Before
46:         public void setUp() {
47:                 serviceReference = bundleContext.getServiceReference(EMFFormsDMRExpander.class);
48:                 service = bundleContext.getService(serviceReference);
49:         }
50:
51:         @After
52:         public void tearDown() {
53:                 bundleContext.ungetService(serviceReference);
54:         }
55:
56:         @Test
57:         public void testServiceType() {
58:                 assertTrue(EMFFormsDMRExpanderDefaultHeuristic.class.isInstance(service));
59:         }
60:
61: }