Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
786ba48b
Commit
786ba48b
authored
May 29, 2020
by
Piotr Gawron
Browse files
drugbank data changed
parent
7c56c63f
Pipeline
#27358
passed with stage
in 12 minutes and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
service/src/test/java/lcsb/mapviewer/services/search/drug/DrugServiceTest.java
View file @
786ba48b
...
...
@@ -53,45 +53,6 @@ public class DrugServiceTest extends ServiceTestFunctions {
}
}
@Test
public
void
testGetTargets
()
throws
Exception
{
long
count
=
searchHistoryDao
.
getCount
();
Model
model
=
new
ModelFullIndexed
(
null
);
Project
project
=
new
Project
();
project
.
setOwner
(
userDao
.
getUserByLogin
(
ADMIN_BUILT_IN_LOGIN
));
project
.
setProjectId
(
"TesT"
);
project
.
addModel
(
model
);
Drug
drug
=
drugService
.
getByName
(
"Diazoxide"
,
new
DbSearchCriteria
().
project
(
project
).
ipAddress
(
"ip"
));
assertNotNull
(
drug
);
assertNotNull
(
drug
.
getName
());
assertFalse
(
drug
.
getName
().
trim
().
equals
(
""
));
assertNotNull
(
drug
.
getDescription
());
assertFalse
(
drug
.
getDescription
().
trim
().
equals
(
""
));
String
hgnc1
=
"SLC12A3"
;
String
hgnc2
=
"KCNJ8"
;
boolean
hgnc1Exists
=
false
;
boolean
hgnc2Exists
=
false
;
for
(
Target
target
:
drug
.
getTargets
())
{
for
(
MiriamData
row
:
target
.
getGenes
())
{
if
(
row
.
getResource
().
equalsIgnoreCase
(
hgnc1
))
hgnc1Exists
=
true
;
if
(
row
.
getResource
().
equalsIgnoreCase
(
hgnc2
))
hgnc2Exists
=
true
;
}
}
assertTrue
(
"Target "
+
hgnc1
+
" doesn't exist in target list but should"
,
hgnc1Exists
);
assertTrue
(
"Target "
+
hgnc2
+
" doesn't exist in target list but should"
,
hgnc2Exists
);
long
count2
=
searchHistoryDao
.
getCount
();
assertEquals
(
count
+
1
,
count2
);
assertEquals
(
"YES"
,
drug
.
getBloodBrainBarrier
());
}
@Test
public
void
testGetTargetsBySynonym
()
throws
Exception
{
...
...
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