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
ca7beee0
Commit
ca7beee0
authored
7 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
skip invalid cell designer files
parent
e270e998
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!44
Resolve "semantic zoom"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
converter-SBGNML/src/test/java/lcsb/mapviewer/converter/model/sbgnml/CellDesigner2SbgnmlConversionTest.java
+15
-10
15 additions, 10 deletions
...erter/model/sbgnml/CellDesigner2SbgnmlConversionTest.java
with
15 additions
and
10 deletions
converter-SBGNML/src/test/java/lcsb/mapviewer/converter/model/sbgnml/CellDesigner2SbgnmlConversionTest.java
+
15
−
10
View file @
ca7beee0
...
...
@@ -8,6 +8,7 @@ import java.nio.file.Paths;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.log4j.Logger
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
...
...
@@ -22,9 +23,9 @@ import lcsb.mapviewer.model.map.model.Model;
@RunWith
(
Parameterized
.
class
)
public
class
CellDesigner2SbgnmlConversionTest
{
Logger
logger
=
Logger
.
getLogger
(
CellDesigner2SbgnmlConversionTest
.
class
.
getName
());
private
static
Logger
logger
=
Logger
.
getLogger
(
CellDesigner2SbgnmlConversionTest
.
class
.
getName
());
private
Path
testPath
;
private
Path
testPath
;
public
CellDesigner2SbgnmlConversionTest
(
Path
testPath
)
{
this
.
testPath
=
testPath
;
...
...
@@ -32,15 +33,19 @@ public class CellDesigner2SbgnmlConversionTest {
@Parameters
(
name
=
"{index} : {0}"
)
public
static
Collection
<
Object
[]>
data
()
throws
IOException
{
Collection
<
Object
[]>
data
=
new
ArrayList
<
Object
[]
>();
Collection
<
Object
[]>
data
=
new
ArrayList
<>();
Files
.
walk
(
Paths
.
get
(
"../converter-CellDesigner/testFiles"
)).
forEach
(
fPath
->
{
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".xml"
))
{
String
tempPath
=
fPath
.
toString
().
substring
(
fPath
.
toString
().
indexOf
(
"testFiles"
)
+
"testFiles"
.
length
()
+
1
);
if
(!
tempPath
.
contains
(
"_full"
))
{
// String tName =
// fPath.toString().substring(fPath.toString().indexOf("testFiles") +
// "testFiles".length(), fPath.toString().indexOf(".xml"));
data
.
add
(
new
Object
[]
{
fPath
});
if
(
Files
.
isRegularFile
(
fPath
)
&&
fPath
.
toString
().
endsWith
(
".xml"
)&&
fPath
.
toString
().
indexOf
(
"invalid"
)==-
1
)
{
try
{
String
tempPath
=
fPath
.
toString
().
substring
(
fPath
.
toString
().
indexOf
(
"testFiles"
)
+
"testFiles"
.
length
()
+
1
);
if
(!
tempPath
.
contains
(
"_full"
))
{
String
content
=
FileUtils
.
readFileToString
(
fPath
.
toFile
());
if
(
content
.
indexOf
(
"xmlns:celldesigner"
)
>=
0
)
{
data
.
add
(
new
Object
[]
{
fPath
});
}
}
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
();
}
}
});
...
...
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