Commit dc28d58a authored by Piotr Gawron's avatar Piotr Gawron
Browse files

test coverage for model module

parent 16ced3f7
......@@ -91,7 +91,11 @@ public class ProjectTest {
String name = "name3";
MiriamData disease = new MiriamData();
Project project = new Project("str");
boolean sbgn = true;
project.setSbgnFormat(sbgn);
assertEquals(sbgn, project.isSbgnFormat());
project.setId(id);
assertEquals(id, project.getId());
......
......@@ -6,7 +6,8 @@ import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
@SuiteClasses({ BasicPrivilegeTest.class, //
ConfigurationElementTypeTest.class, //
ConfigurationElementTypeTest.class, //
ConfigurationElementEditTypeTest.class, //
ConfigurationTest.class, //
ObjectPrivilegeTest.class, //
PrivilegeTypeTest.class, //
......
package lcsb.mapviewer.model.user;
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
public class ConfigurationElementEditTypeTest {
@AfterClass
public static void tearDownAfterClass() throws Exception {
}
@Before
public void setUp() throws Exception {
}
@After
public void tearDown() throws Exception {
}
@Test
public void testValues() {
for (ConfigurationElementEditType type: ConfigurationElementEditType.values()){
assertNotNull(ConfigurationElementEditType.valueOf(type.toString()));
}
}
}
......@@ -25,6 +25,7 @@ public class ConfigurationElementTypeTest {
ConfigurationElementType.valueOf(type.toString());
assertNotNull(type.getCommonName());
assertNotNull(type.getDefaultValue());
assertNotNull(type.getEditType());
}
}
}
......@@ -3,6 +3,7 @@ package lcsb.mapviewer.model.user;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.awt.Color;
import java.util.HashSet;
import java.util.Set;
......@@ -66,7 +67,15 @@ public class UserTest {
Set<BasicPrivilege> privileges = new HashSet<>();
boolean removed = true;
UserAnnotationSchema annotationSchema = new UserAnnotationSchema();
Color minColor = Color.BLACK;
Color maxColor = Color.BLUE;
user.setMaxColor(maxColor);
assertEquals(maxColor, user.getMaxColor());
user.setMinColor(minColor);
assertEquals(minColor, user.getMinColor());
user.setId(id);
assertEquals((Integer)id, user.getId());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment