Skip to content

Package: ProjectName_Test

ProjectName_Test

nameinstructionbranchcomplexitylinemethod
ProjectName_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%
init()
M: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
testGetNSPrefix()
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
testGetNSURL()
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
testGetProjectName()
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
testGetProjectNameOnePart()
M: 0 C: 12
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-2013 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: * David Soto Setzke - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.ecore.editor.test;
15:
16: import static org.junit.Assert.assertEquals;
17:
18: import org.eclipse.emf.ecp.ecore.editor.util.ProjectHelper;
19: import org.junit.Before;
20: import org.junit.Test;
21:
22: public class ProjectName_Test {
23:
24:         private ProjectHelper projectHelper;
25:
26:         @Before
27:         public void init() {
28:                 projectHelper = new ProjectHelper("");
29:         }
30:
31:         @Test
32:         public void testGetProjectName() {
33:                 projectHelper.setProjectFullName("org.eclipse.ecp.emf.ecore.editor");
34:                 final String string = projectHelper.getProjectName();
35:                 assertEquals("editor", string);
36:
37:         }
38:
39:         @Test
40:         public void testGetProjectNameOnePart() {
41:                 projectHelper.setProjectFullName("org");
42:                 final String string = projectHelper.getProjectName();
43:                 assertEquals("org", string);
44:         }
45:
46:         @Test
47:         public void testGetNSPrefix() {
48:                 projectHelper.setProjectFullName("org.eclipse.ecp.emf.ecore.editor");
49:                 final String string = projectHelper.getNSPrefix();
50:                 assertEquals("org.eclipse.ecp.emf.ecore", string);
51:         }
52:
53:         @Test
54:         public void testGetNSURL() {
55:                 projectHelper.setProjectFullName("org.eclipse.ecp.emf.ecore.editor");
56:                 final String string = projectHelper.getNSURL();
57:                 assertEquals("http://eclipse.org/ecp/emf/ecore/editor", string);
58:         }
59:
60: }