Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
d6c79df3
Commit
d6c79df3
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
unit test refactor
parent
3f760694
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!630
WIP: Resolve "The privileges of a new user are not saved in some cases"
,
!560
Resolve "add support for modifications and states in sbml export/import"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/SbmlExporterTest.java
+19
-26
19 additions, 26 deletions
...lcsb/mapviewer/converter/model/sbml/SbmlExporterTest.java
with
19 additions
and
26 deletions
converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/SbmlExporterTest.java
+
19
−
26
View file @
d6c79df3
...
...
@@ -52,10 +52,14 @@ import lcsb.mapviewer.model.map.species.field.Residue;
public
class
SbmlExporterTest
{
Logger
logger
=
Logger
.
getLogger
(
SbmlExporterTest
.
class
);
SbmlParser
parser
=
new
SbmlParser
();
SbmlExporter
exporter
=
new
SbmlExporter
()
;
SbmlExporter
exporter
;
ModelComparator
comparator
=
new
ModelComparator
();
public
SbmlExporterTest
()
{
exporter
=
new
SbmlExporter
();
}
@Test
public
void
testExportCompartment
()
throws
Exception
{
Model
model
=
getModelAfterSerializing
(
"testFiles/layoutExample/CompartmentGlyph_Example_level2_level3.xml"
);
...
...
@@ -443,12 +447,7 @@ public class SbmlExporterTest {
@Test
public
void
testExportProteinState
()
throws
Exception
{
Model
model
=
createEmptyModel
();
GenericProtein
element
=
new
GenericProtein
(
"id"
);
element
.
setName
(
"test name"
);
element
.
setX
(
10
);
element
.
setWidth
(
10
);
element
.
setY
(
10
);
element
.
setHeight
(
10
);
GenericProtein
element
=
createProtein
();
element
.
setStructuralState
(
"xxx"
);
model
.
addElement
(
element
);
Model
deserializedModel
=
getModelAfterSerializing
(
model
);
...
...
@@ -459,12 +458,7 @@ public class SbmlExporterTest {
@Test
public
void
testExportPositionToCompartment
()
throws
Exception
{
Model
model
=
createEmptyModel
();
GenericProtein
element
=
new
GenericProtein
(
"id"
);
element
.
setName
(
"test name"
);
element
.
setX
(
10
);
element
.
setWidth
(
10
);
element
.
setY
(
10
);
element
.
setHeight
(
10
);
GenericProtein
element
=
createProtein
();
element
.
setPositionToCompartment
(
PositionToCompartment
.
INSIDE
);
model
.
addElement
(
element
);
Model
deserializedModel
=
getModelAfterSerializing
(
model
);
...
...
@@ -535,12 +529,7 @@ public class SbmlExporterTest {
@Test
public
void
testMultiExtensionTypeDefinition
()
throws
Exception
{
Model
model
=
createEmptyModel
();
GenericProtein
element
=
new
GenericProtein
(
"id"
);
element
.
setName
(
"test name"
);
element
.
setX
(
10
);
element
.
setWidth
(
10
);
element
.
setY
(
10
);
element
.
setHeight
(
10
);
GenericProtein
element
=
createProtein
();
model
.
addElement
(
element
);
org
.
sbml
.
jsbml
.
Model
sbmlModel
=
exporter
.
toSbmlDocument
(
model
).
getModel
();
...
...
@@ -585,12 +574,7 @@ public class SbmlExporterTest {
@Test
public
void
testExportResidue
()
throws
Exception
{
Model
model
=
createEmptyModel
();
GenericProtein
element
=
new
GenericProtein
(
"id"
);
element
.
setName
(
"test name"
);
element
.
setX
(
10
);
element
.
setWidth
(
10
);
element
.
setY
(
10
);
element
.
setHeight
(
10
);
GenericProtein
element
=
createProtein
();
Residue
mr
=
new
Residue
(
"x1"
);
mr
.
setName
(
"217U"
);
mr
.
setState
(
ModificationState
.
PHOSPHORYLATED
);
...
...
@@ -614,6 +598,16 @@ public class SbmlExporterTest {
}
private
GenericProtein
createProtein
()
{
GenericProtein
element
=
new
GenericProtein
(
"id"
);
element
.
setName
(
"test name"
);
element
.
setX
(
10
);
element
.
setWidth
(
10
);
element
.
setY
(
10
);
element
.
setHeight
(
10
);
return
element
;
}
@Test
public
void
testExportNotes
()
throws
Exception
{
Model
model
=
createEmptyModel
();
...
...
@@ -623,5 +617,4 @@ public class SbmlExporterTest {
assertEquals
(
"Notes weren't exported/imported properly"
,
model
.
getNotes
(),
deserializedModel
.
getNotes
());
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment