Search in sources :

Example 11 with AnnotationProperty

use of org.nextprot.api.core.domain.annotation.AnnotationProperty in project nextprot-api by calipho-sib.

the class AnnotationUtilsTest method newAnnotationProperty.

public static AnnotationProperty newAnnotationProperty(long annotationId, String accession, String name, String value, String valueType) {
    AnnotationProperty property = new AnnotationProperty();
    property.setAnnotationId(annotationId);
    property.setAccession(accession);
    property.setName(name);
    property.setValue(value);
    property.setValueType(valueType);
    return property;
}
Also used : AnnotationProperty(org.nextprot.api.core.domain.annotation.AnnotationProperty)

Example 12 with AnnotationProperty

use of org.nextprot.api.core.domain.annotation.AnnotationProperty in project nextprot-api by calipho-sib.

the class AnnotationPropertyComparatorTest method testCompareByNameFirst.

@Test
public void testCompareByNameFirst() throws Exception {
    AnnotationPropertyComparator comparator = new AnnotationPropertyComparator();
    AnnotationProperty prop1 = mockAnnotationProperty("position", "853");
    AnnotationProperty prop2 = mockAnnotationProperty("conflict", "853");
    Assert.assertTrue(comparator.compare(prop1, prop2) > 0);
}
Also used : AnnotationProperty(org.nextprot.api.core.domain.annotation.AnnotationProperty) Test(org.junit.Test)

Example 13 with AnnotationProperty

use of org.nextprot.api.core.domain.annotation.AnnotationProperty in project nextprot-api by calipho-sib.

the class AnnotationPropertyComparatorTest method testCompareThenByValueInNumericContext.

@Test
public void testCompareThenByValueInNumericContext() throws Exception {
    AnnotationPropertyComparator comparator = new AnnotationPropertyComparator();
    AnnotationProperty prop1 = mockAnnotationProperty("position", "853");
    AnnotationProperty prop2 = mockAnnotationProperty("position", "1538989");
    Assert.assertTrue(comparator.compare(prop1, prop2) < 0);
}
Also used : AnnotationProperty(org.nextprot.api.core.domain.annotation.AnnotationProperty) Test(org.junit.Test)

Example 14 with AnnotationProperty

use of org.nextprot.api.core.domain.annotation.AnnotationProperty in project nextprot-api by calipho-sib.

the class AnnotationDAOImplTest method testSetPropertyNameValue.

@Test
public void testSetPropertyNameValue() throws Exception {
    AnnotationProperty property = new AnnotationProperty();
    AnnotationDAOImpl.setPropertyNameValue(property, "mutation", "blablabla");
    Assert.assertEquals("blablabla", property.getValue());
}
Also used : AnnotationProperty(org.nextprot.api.core.domain.annotation.AnnotationProperty) Test(org.junit.Test)

Aggregations

AnnotationProperty (org.nextprot.api.core.domain.annotation.AnnotationProperty)14 Test (org.junit.Test)7 Annotation (org.nextprot.api.core.domain.annotation.Annotation)4 AnnotationEvidence (org.nextprot.api.core.domain.annotation.AnnotationEvidence)2 AnnotationIsoformSpecificity (org.nextprot.api.core.domain.annotation.AnnotationIsoformSpecificity)2 CoreUnitBaseTest (org.nextprot.api.core.test.base.CoreUnitBaseTest)2 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1 AnnotationCategory (org.nextprot.api.commons.constants.AnnotationCategory)1 Family (org.nextprot.api.core.domain.Family)1