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
85049dd8
Commit
85049dd8
authored
Feb 05, 2018
by
Piotr Gawron
Browse files
list of chemical sources doesn't contain null anymore
parent
7eec9884
Changes
4
Hide whitespace changes
Inline
Side-by-side
annotation/src/main/java/lcsb/mapviewer/annotation/data/Chemical.java
View file @
85049dd8
...
...
@@ -291,13 +291,17 @@ public class Chemical implements Serializable, TargettingStructure {
}
@Override
public
Collection
<
MiriamData
>
getSources
()
{
List
<
MiriamData
>
sources
=
new
ArrayList
<>();
sources
.
add
(
getCasID
());
sources
.
add
(
getChemicalId
());
return
sources
;
}
@Override
public
Collection
<
MiriamData
>
getSources
()
{
List
<
MiriamData
>
sources
=
new
ArrayList
<>();
if
(
getCasID
()
!=
null
)
{
sources
.
add
(
getCasID
());
}
if
(
getChemicalId
()
!=
null
)
{
sources
.
add
(
getChemicalId
());
}
return
sources
;
}
@Override
public
Collection
<
Target
>
getTargets
()
{
...
...
service/src/main/java/lcsb/mapviewer/services/search/db/DbSearchService.java
View file @
85049dd8
...
...
@@ -44,5 +44,4 @@ public abstract class DbSearchService {
}
}
}
service/src/test/java/lcsb/mapviewer/services/search/db/AllSearchDbTests.java
View file @
85049dd8
...
...
@@ -10,8 +10,9 @@ import lcsb.mapviewer.services.search.db.mirna.MiRNAServiceTest;
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
AllSearchDrugTests
.
class
,
//
ChemicalServiceTest
.
class
,
//
MiRNAServiceTest
.
class
,
//
ChemicalServiceTest
.
class
,
//
DbSearchServiceTest
.
class
,
//
MiRNAServiceTest
.
class
,
//
})
public
class
AllSearchDbTests
{
...
...
service/src/test/java/lcsb/mapviewer/services/search/db/DbSearchServiceTest.java
0 → 100644
View file @
85049dd8
package
lcsb.mapviewer.services.search.db
;
import
org.junit.Test
;
import
org.mockito.Mockito
;
import
lcsb.mapviewer.annotation.data.Chemical
;
public
class
DbSearchServiceTest
{
@Test
public
void
testCacheMiriamData
()
throws
Exception
{
Chemical
chemical
=
new
Chemical
();
DbSearchService
service
=
Mockito
.
mock
(
DbSearchService
.
class
,
Mockito
.
CALLS_REAL_METHODS
);
service
.
cacheMiriamData
(
chemical
);
}
}
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