Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
dc28d58a
Commit
dc28d58a
authored
Oct 27, 2016
by
Piotr Gawron
Browse files
test coverage for model module
parent
16ced3f7
Changes
5
Hide whitespace changes
Inline
Side-by-side
model/src/test/java/lcsb/mapviewer/model/ProjectTest.java
View file @
dc28d58a
...
...
@@ -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
());
...
...
model/src/test/java/lcsb/mapviewer/model/user/AllUserTests.java
View file @
dc28d58a
...
...
@@ -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
,
//
...
...
model/src/test/java/lcsb/mapviewer/model/user/ConfigurationElementEditTypeTest.java
0 → 100644
View file @
dc28d58a
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
()));
}
}
}
model/src/test/java/lcsb/mapviewer/model/user/ConfigurationElementTypeTest.java
View file @
dc28d58a
...
...
@@ -25,6 +25,7 @@ public class ConfigurationElementTypeTest {
ConfigurationElementType
.
valueOf
(
type
.
toString
());
assertNotNull
(
type
.
getCommonName
());
assertNotNull
(
type
.
getDefaultValue
());
assertNotNull
(
type
.
getEditType
());
}
}
}
model/src/test/java/lcsb/mapviewer/model/user/UserTest.java
View file @
dc28d58a
...
...
@@ -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
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment