use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveExpressionAtlas.
@Test
public void testResolveExpressionAtlas() throws Exception {
DbXref xref = createDbXref("AF009225", "ExpressionAtlas", "http://www.ebi.ac.uk/whatever");
Assert.assertEquals("http://www.ebi.ac.uk/gxa/search?geneQuery=%09AF009225", resolver.resolve(xref));
Assert.assertEquals("http://www.ebi.ac.uk/gxa/search?geneQuery=%09%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolvePIRWithoutURLProtocol.
// entry/NX_P51610/xref.json
@Test
public void testResolvePIRWithoutURLProtocol() throws Exception {
DbXref xref = createDbXref("babebibobu", "PIR", "pir.georgetown.edu/cgi-bin/nbrfget?uid=%s");
xref.setProperties(Collections.singletonList(createDbXrefProperty("entry name", "A40718")));
Assert.assertEquals("http://pir.georgetown.edu/cgi-bin/nbrfget?uid=A40718", resolver.resolve(xref));
Assert.assertEquals("http://pir.georgetown.edu/cgi-bin/nbrfget?uid=%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveCGH_DBMissingPlaceHolder.
@Test(expected = UnresolvedXrefURLException.class)
public void testResolveCGH_DBMissingPlaceHolder() throws Exception {
DbXref xref = createDbXref("9029-4", "CGH-DB", "http://www.cghtmd.jp/CGHDatabase/mapViewer?hid=%s&aid=t&lang=en");
resolver.resolve(xref);
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveHogenom.
@Test
public void testResolveHogenom() throws Exception {
DbXref xref = createDbXrefWithEntry("NX_Q8NBS9", "HOG000007899", "HOGENOM", "http://pbil.univ-lyon1.fr/cgi-bin/acnuc-ac2tree?query=%u&db=HOGENOM");
Assert.assertEquals("http://pbil.univ-lyon1.fr/cgi-bin/acnuc-ac2tree?query=Q8NBS9&db=HOGENOM", resolver.resolve(xref));
Assert.assertEquals("http://pbil.univ-lyon1.fr/cgi-bin/acnuc-ac2tree?query=%u&db=HOGENOM", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveTKGMissingPlaceHolderN.
@Test(expected = UnresolvedXrefURLException.class)
public void testResolveTKGMissingPlaceHolderN() throws Exception {
DbXref xref = createDbXref("0377", "TKG", "http://www2.idac.tohoku.ac.jp/dep/ccr/TKGdate/TKGvo10n/%s.html");
resolver.resolve(xref);
}
Aggregations