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;
}
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);
}
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);
}
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());
}
Aggregations