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
fa0fcddf
Commit
fa0fcddf
authored
Apr 26, 2019
by
Piotr Gawron
Browse files
depreacted field are not present in the output
parent
223d7bc7
Pipeline
#10031
passed with stage
in 8 minutes and 42 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
converter-CellDesigner/src/test/java/lcsb/mapviewer/converter/model/celldesigner/annotation/RestAnnotationParserTest.java
View file @
fa0fcddf
...
@@ -6,6 +6,7 @@ import static org.junit.Assert.assertNotNull;
...
@@ -6,6 +6,7 @@ import static org.junit.Assert.assertNotNull;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
junit
.
Assert
.
fail
;
import
static
org
.
junit
.
Assert
.
fail
;
import
java.lang.reflect.Field
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -293,11 +294,23 @@ public class RestAnnotationParserTest extends CellDesignerTestFunctions {
...
@@ -293,11 +294,23 @@ public class RestAnnotationParserTest extends CellDesignerTestFunctions {
assertTrue
(
str
.
contains
(
former2
));
assertTrue
(
str
.
contains
(
former2
));
for
(
NoteField
field
:
NoteField
.
values
())
{
for
(
NoteField
field
:
NoteField
.
values
())
{
boolean
deprecated
=
false
;
try
{
Field
f
=
NoteField
.
class
.
getField
(
field
.
name
());
if
(
f
.
isAnnotationPresent
(
Deprecated
.
class
))
deprecated
=
true
;
}
catch
(
NoSuchFieldException
|
SecurityException
e
)
{
}
if
(!
deprecated
)
{
if
(
field
.
getClazz
().
isAssignableFrom
(
element
.
getClass
())
if
(
field
.
getClazz
().
isAssignableFrom
(
element
.
getClass
())
||
CellDesignerElement
.
class
.
isAssignableFrom
(
field
.
getClazz
()))
{
||
CellDesignerElement
.
class
.
isAssignableFrom
(
field
.
getClazz
()))
{
assertTrue
(
"Export string doesn't contain info about: "
+
field
.
getCommonName
(),
assertTrue
(
"Export string doesn't contain info about: "
+
field
.
getCommonName
(),
str
.
indexOf
(
field
.
getCommonName
())
>=
0
);
str
.
indexOf
(
field
.
getCommonName
())
>=
0
);
}
}
}
}
}
...
@@ -318,7 +331,7 @@ public class RestAnnotationParserTest extends CellDesignerTestFunctions {
...
@@ -318,7 +331,7 @@ public class RestAnnotationParserTest extends CellDesignerTestFunctions {
for
(
NoteField
field
:
NoteField
.
values
())
{
for
(
NoteField
field
:
NoteField
.
values
())
{
if
(
field
.
getClazz
().
isAssignableFrom
(
element
.
getClass
())
if
(
field
.
getClazz
().
isAssignableFrom
(
element
.
getClass
())
||
CellDesignerElement
.
class
.
isAssignableFrom
(
field
.
getClazz
()))
{
||
CellDesignerElement
.
class
.
isAssignableFrom
(
field
.
getClazz
()))
{
assertFalse
(
"Export string contain info about: "
+
field
.
getCommonName
()
+
". But shouldn't"
,
assertFalse
(
"Export string contain info about: "
+
field
.
getCommonName
()
+
". But shouldn't"
,
str
.
indexOf
(
field
.
getCommonName
())
>=
0
);
str
.
indexOf
(
field
.
getCommonName
())
>=
0
);
}
}
...
@@ -369,8 +382,10 @@ public class RestAnnotationParserTest extends CellDesignerTestFunctions {
...
@@ -369,8 +382,10 @@ public class RestAnnotationParserTest extends CellDesignerTestFunctions {
Node
node
=
super
.
getNodeFromXmlString
(
"<notes>\n"
+
Node
node
=
super
.
getNodeFromXmlString
(
"<notes>\n"
+
"Name: L-cystine\n"
+
"Name: L-cystine\n"
+
"Synonyms: (R,R)-3,3'-dithiobis(2-aminopropanoic acid), (R-(R*,R*))-3,3'-Dithiobis(2-aminopropanoic acid), 3,3'-Dithiobis-L-alanine, beta,beta'-diamino-beta,beta'-dicarboxydiethyl disulfide, beta,beta'-dithiodialanine, bis(beta-amino-beta-carboxyethyl) disulfide, E921, L-alpha-Diamino-beta-dithiolactic acid, L-Cystine, L-Dicysteine, oxidized L-cysteine, Recon metabolite: mma\n"
+
"Synonyms: (R,R)-3,3'-dithiobis(2-aminopropanoic acid), (R-(R*,R*))-3,3'-Dithiobis(2-aminopropanoic acid), 3,3'-Dithiobis-L-alanine, beta,beta'-diamino-beta,beta'-dicarboxydiethyl disulfide, beta,beta'-dithiodialanine, bis(beta-amino-beta-carboxyethyl) disulfide, E921, L-alpha-Diamino-beta-dithiolactic acid, L-Cystine, L-Dicysteine, oxidized L-cysteine, Recon metabolite: mma\n"
"Description: VMH database: <a xmlns=\"http://www.w3.org/1999/xhtml\" href=\"http://vmh.uni.lu/#metabolite/mma\">mma</a>\n"
+
+
"Description: VMH database: <a xmlns=\"http://www.w3.org/1999/xhtml\" href=\"http://vmh.uni.lu/#metabolite/mma\">mma</a>\n"
+
"SemanticZoomLevelVisibility: 5\n"
+
"SemanticZoomLevelVisibility: 5\n"
+
"Charge: 0\n"
+
"Charge: 0\n"
+
"</notes>\n"
+
"</notes>\n"
+
...
...
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