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
eaecc1df
Commit
eaecc1df
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
unit test checking if model is the same after translation: CellDesigner->Sbml->CellDesigner
parent
f6d12bb6
No related branches found
No related tags found
2 merge requests
!630
WIP: Resolve "The privileges of a new user are not saved in some cases"
,
!494
Conversion rest api scaling
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/SbmlExporterFromCellDesignerTest.java
+9
-6
9 additions, 6 deletions
...onverter/model/sbml/SbmlExporterFromCellDesignerTest.java
with
9 additions
and
6 deletions
converter-sbml/src/test/java/lcsb/mapviewer/converter/model/sbml/SbmlExporterFromCellDesignerTest.java
+
9
−
6
View file @
eaecc1df
...
...
@@ -33,20 +33,22 @@ public class SbmlExporterFromCellDesignerTest {
try
{
Model
originalModel
=
cellDesignerXmlParser
.
createModel
(
new
ConverterParams
().
filename
(
"testFiles/cell_designer_problems/heterodimer_association.xml"
));
Reaction
r1
=
originalModel
.
getReactions
().
iterator
().
next
();
Model
model
=
getModelAfterSerializing
(
originalModel
);
Reaction
r2
=
model
.
getReactions
().
iterator
().
next
();
Reaction
reaction1
=
originalModel
.
getReactions
().
iterator
().
next
();
Reaction
reaction2
=
model
.
getReactions
().
iterator
().
next
();
//change reaction id - due to some issues it cannot be persisted properly in sbml format
reaction2
.
setIdReaction
(
reaction1
.
getIdReaction
());
model
.
setName
(
originalModel
.
getName
());
logger
.
debug
(
r1
.
getOperators
().
iterator
().
next
().
getClass
());
logger
.
debug
(
r2
.
getOperators
().
iterator
().
next
().
getClass
());
logger
.
debug
(
r1
.
getReactants
().
get
(
1
).
getLine
().
getPoints
());
logger
.
debug
(
r2
.
getReactants
().
get
(
1
).
getLine
().
getPoints
());
String
cellDesignerXml
=
cellDesignerXmlParser
.
toXml
(
model
);
ByteArrayInputStream
stream
=
new
ByteArrayInputStream
(
cellDesignerXml
.
getBytes
(
"UTF-8"
));
assertEquals
(
0
,
comparator
.
compare
(
model
,
originalModel
));
Model
cdModel
=
cellDesignerXmlParser
.
createModel
(
new
ConverterParams
().
inputStream
(
stream
));
cdModel
.
setName
(
originalModel
.
getName
());
assertEquals
(
0
,
comparator
.
compare
(
model
,
cdModel
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
@@ -56,6 +58,7 @@ public class SbmlExporterFromCellDesignerTest {
private
Model
getModelAfterSerializing
(
Model
originalModel
)
throws
Exception
{
String
xml
=
exporter
.
toXml
(
originalModel
);
// logger.debug(xml);
ByteArrayInputStream
stream
=
new
ByteArrayInputStream
(
xml
.
getBytes
(
"UTF-8"
));
Model
result
=
parser
.
createModel
(
new
ConverterParams
().
inputStream
(
stream
));
// showImage(originalModel);
...
...
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