Skip to content

Package: FeaturePathDomainModelReferenceConverter_ITest

FeaturePathDomainModelReferenceConverter_ITest

nameinstructionbranchcomplexitylinemethod
FeaturePathDomainModelReferenceConverter_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: 4
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: 3
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.databinding.featurepath;
15:
16: import static org.junit.Assert.assertTrue;
17:
18: import org.eclipse.emfforms.core.services.databinding.featurepath.FeaturePathDomainModelReferenceConverter;
19: import org.eclipse.emfforms.spi.core.services.databinding.DomainModelReferenceConverter;
20: import org.junit.After;
21: import org.junit.Before;
22: import org.junit.BeforeClass;
23: import org.junit.Test;
24: import org.osgi.framework.BundleContext;
25: import org.osgi.framework.FrameworkUtil;
26: import org.osgi.framework.ServiceReference;
27:
28: /**
29: * JUnit integration test for the {@link FeaturePathDomainModelReferenceConverter}.
30: *
31: * @author Lucas Koehler
32: *
33: */
34: public class FeaturePathDomainModelReferenceConverter_ITest {
35:
36:         private static BundleContext bundleContext;
37:         private DomainModelReferenceConverter service;
38:         private ServiceReference<DomainModelReferenceConverter> serviceReference;
39:
40:         @BeforeClass
41:         public static void setUpBeforeClass() {
42:                 bundleContext = FrameworkUtil.getBundle(FeaturePathDomainModelReferenceConverter_ITest.class)
43:                         .getBundleContext();
44:         }
45:
46:         @Before
47:         public void setUp() {
48:                 serviceReference = bundleContext
49:                         .getServiceReference(DomainModelReferenceConverter.class);
50:                 service = bundleContext.getService(serviceReference);
51:         }
52:
53:         @After
54:         public void tearDown() {
55:                 bundleContext.ungetService(serviceReference);
56:         }
57:
58:         @Test
59:         public void testServiceType() {
60:                 assertTrue(FeaturePathDomainModelReferenceConverter.class.isInstance(service));
61:
62:         }
63:
64: }