use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class UnigeneXrefURLResolverTest method testResolveUniGene.
@Test
public void testResolveUniGene() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("Hs.83634", "UniGene", "http://www.ncbi.nlm.nih.gov/UniGene/clust.cgi?ORG=%d&CID=%s");
Assert.assertEquals("http://www.ncbi.nlm.nih.gov/UniGene/clust.cgi?ORG=Hs&CID=83634", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class ClinvarXrefURLResolverTest method testResolveClinvar.
@Test
public void testResolveClinvar() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("HCFC1", "Clinvar", "url.whatever");
Assert.assertEquals("http://www.ncbi.nlm.nih.gov/clinvar/?term=HCFC1", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class ConstantXrefDatabasebURLResolverTest method testResolvePrositeProRuleDbURL.
@Test
public void testResolvePrositeProRuleDbURL() throws Exception {
DefaultDbXrefURLResolver resolver = new ConstantXrefDatabasebURLResolver("http://prosite.expasy.org/");
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("PRU00156", "PROSITE-ProRule", "https://prosite.expasy.org/");
Assert.assertEquals("http://prosite.expasy.org/", resolver.getValidXrefURL(xref.getUrl(), "PROSITE-ProRule"));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolvePIRShouldThrowsException.
@Test(expected = UnresolvedXrefURLException.class)
public void testResolvePIRShouldThrowsException() throws Exception {
DbXref xref = 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));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveTKG.
@Test
public void testResolveTKG() throws Exception {
DbXref xref = createDbXref("0377", "TKG", "http://www2.idac.tohoku.ac.jp/dep/ccr/TKGdate/TKGvo10%n/%s.html");
Assert.assertEquals("http://www2.idac.tohoku.ac.jp/dep/ccr/TKGdate/TKGvo103/0377.html", resolver.resolve(xref));
Assert.assertEquals("http://www2.idac.tohoku.ac.jp/dep/ccr/TKGdate/TKGvo10%n/%s.html", xref.getLinkUrl());
}
Aggregations