use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveEmbl.
@Test
public void testResolveEmbl() throws Exception {
DbXref xref = createDbXref("AF009225", "EMBL", "http://www.ebi.ac.uk/ena/data/view/%s");
Assert.assertEquals("http://www.ebi.ac.uk/ena/data/view/AF009225", resolver.resolve(xref));
Assert.assertEquals("http://www.ebi.ac.uk/ena/data/view/%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method createDbXrefWithEntry.
public static DbXref createDbXrefWithEntry(String entryAccession, String accession, String dbName, String linkURL) {
DbXref xref = createDbXref(accession, dbName, linkURL);
xref.setProteinAccessionReferer(entryAccession);
return xref;
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveHSSPWithPDB.
@Test
public void testResolveHSSPWithPDB() throws Exception {
DbXref xref = createDbXref("PS50853", "HSSP", "%s");
xref.setProperties(Collections.singletonList(createDbXrefProperty("PDB accession", "1A7F")));
Assert.assertEquals("http://1a7f", resolver.resolve(xref));
Assert.assertEquals("http://%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveWEBINFO.
@Test
public void testResolveWEBINFO() throws Exception {
DbXref xref = createDbXref("babebibobu", "WEBINFO", "");
Assert.assertEquals("babebibobu", resolver.resolve(xref));
Assert.assertEquals("", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveProsite.
@Test
public void testResolveProsite() throws Exception {
DbXref xref = createDbXref("PS50853", "PROSITE", "whatever");
Assert.assertEquals("http://prosite.expasy.org/cgi-bin/prosite/prosite-search-ac?PS50853", resolver.resolve(xref));
Assert.assertEquals("http://prosite.expasy.org/cgi-bin/prosite/prosite-search-ac?%s", xref.getLinkUrl());
}
Aggregations