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
d7b5a2ae
There was a problem fetching the pipeline mini graph.
Commit
d7b5a2ae
authored
7 years ago
by
David Hoksza
Browse files
Options
Downloads
Patches
Plain Diff
test with multiple annotators
parent
2a3f005d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!201
Cellwall annotations
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
annotation/src/test/java/lcsb/mapviewer/annotation/services/annotators/MultipleAnnotatorsTest.java
+82
-0
82 additions, 0 deletions
...nnotation/services/annotators/MultipleAnnotatorsTest.java
with
82 additions
and
0 deletions
annotation/src/test/java/lcsb/mapviewer/annotation/services/annotators/MultipleAnnotatorsTest.java
0 → 100644
+
82
−
0
View file @
d7b5a2ae
package
lcsb.mapviewer.annotation.services.annotators
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
junit
.
Assert
.
fail
;
import
static
org
.
mockito
.
Matchers
.
anyString
;
import
static
org
.
mockito
.
Mockito
.
when
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
java.util.Set
;
import
org.junit.After
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.mockito.Mockito
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
lcsb.mapviewer.annotation.AnnotationTestFunctions
;
import
lcsb.mapviewer.annotation.cache.WebPageDownloader
;
import
lcsb.mapviewer.annotation.services.ExternalServiceStatusType
;
import
lcsb.mapviewer.common.exception.InvalidArgumentException
;
import
lcsb.mapviewer.model.map.MiriamData
;
import
lcsb.mapviewer.model.map.MiriamType
;
import
lcsb.mapviewer.model.map.species.GenericProtein
;
import
lcsb.mapviewer.model.map.species.Species
;
public
class
MultipleAnnotatorsTest
extends
AnnotationTestFunctions
{
@Autowired
KeggAnnotator
keggAnnotator
;
@Autowired
UniprotAnnotator
uniprotAnnotator
;
@Autowired
HgncAnnotator
hgncAnnotator
;
@Autowired
BiocompendiumAnnotator
biocompendiumAnnotator
;
@Before
public
void
setUp
()
throws
Exception
{
}
@After
public
void
tearDown
()
throws
Exception
{
}
@Test
public
void
testAnnotateUniprotByUniprotAndKegg
()
throws
Exception
{
try
{
Species
protein
=
new
GenericProtein
(
"id"
);
protein
.
setName
(
"bla"
);
protein
.
addMiriamData
(
new
MiriamData
(
MiriamType
.
UNIPROT
,
"P12345"
));
keggAnnotator
.
annotateElement
(
protein
);
uniprotAnnotator
.
annotateElement
(
protein
);
hgncAnnotator
.
annotateElement
(
protein
);
//biocompendiumAnnotator.annotateElement(protein);
int
cntNoAnnotator
=
0
;
for
(
MiriamData
md:
protein
.
getMiriamData
())
{
if
(
md
.
getAnnotator
()
==
null
)
{
cntNoAnnotator
++;
}
}
assertTrue
(
"Wrong number of annotated elements with no information about annotator"
,
cntNoAnnotator
==
1
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
e
;
}
}
}
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