Skip to content
Snippets Groups Projects
Commit 927d43c2 authored by piotr.gawron's avatar piotr.gawron
Browse files

test coverage improved

parent ec4e94be
No related branches found
No related tags found
1 merge request!1Issue 37
......@@ -172,9 +172,6 @@ public final class ElementUtils {
Set<Class<?>> toRemove = new HashSet<Class<?>>();
for (Class<? extends Element> class1 : classes) {
if (class1.isAnonymousClass() || class1.isMemberClass() || class1.isLocalClass()) {
continue;
}
toRemove.add(class1.getSuperclass());
tmp.add(class1);
}
......
......@@ -44,6 +44,17 @@ public class BottomSquareCompartmentTest {
}
}
@Test
public void testConstructor3() {
try {
BottomSquareCompartment compartment = new BottomSquareCompartment("id");
assertNotNull(compartment);
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test
public void testConstructor2() {
try {
......
......@@ -44,6 +44,17 @@ public class LeftSquareCompartmentTest {
}
}
@Test
public void testConstructor3() {
try {
LeftSquareCompartment compartment = new LeftSquareCompartment("id");
assertNotNull(compartment);
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test
public void testConstructor2() {
try {
......
......@@ -45,6 +45,17 @@ public class RightSquareCompartmentTest {
}
}
@Test
public void testConstructor3() {
try {
RightSquareCompartment compartment = new RightSquareCompartment("id");
assertNotNull(compartment);
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test
public void testConstructor2() {
try {
......
......@@ -47,6 +47,17 @@ public class TopSquareCompartmentTest {
}
}
@Test
public void testConstructor3() {
try {
TopSquareCompartment compartment = new TopSquareCompartment("id");
assertNotNull(compartment);
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test
public void testConstructor2() {
try {
......
......@@ -447,20 +447,6 @@ public class ModelFullIndexedTest {
}
}
@Test
public void testAddInvalidElement() {
try {
ModelFullIndexed model = new ModelFullIndexed(null);
Element element = Mockito.spy(Element.class);
element.setElementId("id");
model.addElement(element);
fail("Exception expected");
} catch (InvalidArgumentException e) {
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test
public void testAddInvalidElement2() {
......
......@@ -118,7 +118,7 @@
<value>lcsb.mapviewer.model.map.model.ModelData</value>
<value>lcsb.mapviewer.model.map.model.AliasSubmodelConnection</value>
<value>lcsb.mapviewer.model.map.model.ElementSubmodelConnection</value>
<value>lcsb.mapviewer.model.map.model.ModelSubmodelConnection</value>
<value>lcsb.mapviewer.model.map.model.SubmodelConnection</value>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment