use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class OboLibraryXrefURLResolverTest method testResolveFMA.
@Test
public void testResolveFMA() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("FMA:62955", "FMA", "http://purl.obolibrary.org/obo/%s");
Assert.assertEquals("http://purl.obolibrary.org/obo/FMA_62955", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class OboLibraryXrefURLResolverTest method testResolvePRO.
@Test
public void testResolvePRO() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("PR:000028527", "PRO", "http://purl.obolibrary.org/obo/PR_%u");
Assert.assertEquals("http://purl.obolibrary.org/obo/PR_000028527", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class OboLibraryXrefURLResolverTest method testResolveCLO.
@Test
public void testResolveCLO() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("CLO:0000031", "CLO", "purl.obolibrary.org/obo/%s");
Assert.assertEquals("http://purl.obolibrary.org/obo/CLO_0000031", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class PirXrefURLResolverTest method testResolvePIRWithoutURLProtocol.
// entry/NX_P51610/xref.json
@Test
public void testResolvePIRWithoutURLProtocol() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("babebibobu", "PIR", "pir.georgetown.edu/cgi-bin/nbrfget?uid=%s");
xref.setProperties(Collections.singletonList(DbXrefURLResolverDelegateTest.createDbXrefProperty("entry name", "A40718")));
Assert.assertEquals("http://pir.georgetown.edu/cgi-bin/nbrfget?uid=A40718", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class PirXrefURLResolverTest method testResolvePIRShouldNotThrowsNPE.
@Test(expected = UnresolvedXrefURLException.class)
public void testResolvePIRShouldNotThrowsNPE() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("babebibobu", "PIR", "pir.georgetown.edu/cgi-bin/nbrfget?uid=%s");
Assert.assertEquals("http://pir.georgetown.edu/cgi-bin/nbrfget?uid=A40718", resolver.resolve(xref));
}
Aggregations