use of org.nextprot.api.core.domain.annotation.AnnotationEvidence in project nextprot-api by calipho-sib.
the class AnnotationTest method testNegativeAndPositive.
/*
* at least one detected, low, high or medium => detected !
*/
@Test
public void testNegativeAndPositive() {
Annotation a = new Annotation();
List<AnnotationEvidence> evidences = new ArrayList<>();
evidences.add(buildEvidence("negative"));
evidences.add(buildEvidence("positive"));
a.setEvidences(evidences);
Assert.assertTrue(a.isExpressionLevelDetected().isPresent());
Assert.assertTrue(a.isExpressionLevelDetected().get());
}
use of org.nextprot.api.core.domain.annotation.AnnotationEvidence in project nextprot-api by calipho-sib.
the class AnnotationTest method testOneNotDetected.
@Test
public void testOneNotDetected() {
Annotation a = new Annotation();
List<AnnotationEvidence> evidences = new ArrayList<>();
evidences.add(buildEvidence("not detected"));
a.setEvidences(evidences);
Assert.assertTrue(a.isExpressionLevelDetected().isPresent());
Assert.assertTrue(!a.isExpressionLevelDetected().get());
}
use of org.nextprot.api.core.domain.annotation.AnnotationEvidence in project nextprot-api by calipho-sib.
the class AnnotationTest method testNotDetectedAndPositive.
/*
* at least one detected, low, high or medium => detected !
*/
@Test
public void testNotDetectedAndPositive() {
Annotation a = new Annotation();
List<AnnotationEvidence> evidences = new ArrayList<>();
evidences.add(buildEvidence("not detected"));
evidences.add(buildEvidence("positive"));
a.setEvidences(evidences);
Assert.assertTrue(a.isExpressionLevelDetected().isPresent());
Assert.assertTrue(a.isExpressionLevelDetected().get());
}
use of org.nextprot.api.core.domain.annotation.AnnotationEvidence in project nextprot-api by calipho-sib.
the class AnnotationTest method testHighAndPositive.
@Test
public void testHighAndPositive() {
Annotation a = new Annotation();
List<AnnotationEvidence> evidences = new ArrayList<>();
evidences.add(buildEvidence("high"));
evidences.add(buildEvidence("positive"));
a.setEvidences(evidences);
Assert.assertTrue(a.isExpressionLevelDetected().isPresent());
Assert.assertTrue(a.isExpressionLevelDetected().get());
}
use of org.nextprot.api.core.domain.annotation.AnnotationEvidence in project nextprot-api by calipho-sib.
the class AnnotationTest method testNoExpressionLevel.
/*
* occurs for every annotation not being a :ExpressionProfile
*/
@Test
public void testNoExpressionLevel() {
Annotation a = new Annotation();
List<AnnotationEvidence> evidences = new ArrayList<>();
evidences.add(new AnnotationEvidence());
a.setEvidences(evidences);
Assert.assertTrue(!a.isExpressionLevelDetected().isPresent());
}
Aggregations