use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveWithAccessionUniPathway.
@Test
public void testResolveWithAccessionUniPathway() throws Exception {
DbXref xref = createDbXrefWithEntry("NX_Q96I99", "UPA00223", "UniPathway", "http://www.unipathway.org?upid=%s&entryac=%u");
Assert.assertEquals("http://www.unipathway.org?upid=UPA00223&entryac=Q96I99", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveCosmicCOSM.
// entry/NX_Q9BXA6/xref.json
@Test
public void testResolveCosmicCOSM() throws Exception {
DbXref xref = createDbXref("COSM1172604", "Cosmic", "whatever");
Assert.assertEquals("http://cancer.sanger.ac.uk/cosmic/mutation/overview?id=1172604", resolver.resolve(xref));
Assert.assertEquals("http://cancer.sanger.ac.uk/cosmic/mutation/overview?id=%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveNIH_ARP.
@Test
public void testResolveNIH_ARP() throws Exception {
DbXref xref = createDbXref("11411-223", "NIH-ARP", "https://www.aidsreagent.org/reagentdetail.cfm?t=cell_lines&id=%s");
Assert.assertEquals("https://www.aidsreagent.org/reagentdetail.cfm?t=cell_lines&id=223", resolver.resolve(xref));
Assert.assertEquals("https://www.aidsreagent.org/reagentdetail.cfm?t=cell_lines&id=%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveChitars.
// TODO: we should not have database link with multiple occurrence of %s that are either a stamp and a value !!!!
@Test
public void testResolveChitars() throws Exception {
DbXref xref = createDbXref("HIST1H3B", "ChiTaRS", "http://ww.example.com/should/be/replaced/by/preferred/%s");
Assert.assertEquals("http://chitars.bioinfo.cnio.es/cgi-bin/search.pl?searchtype=gene_name&searchstr=HIST1H3B&human=1", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveJCRB.
@Test
public void testResolveJCRB() throws Exception {
DbXref xref = createDbXref("JCRB1234", "JCRB", "whatever/%s");
Assert.assertEquals("http://cellbank.nibio.go.jp/~cellbank/en/search_res_list.cgi?KEYWOD=jcrb1234", resolver.resolve(xref));
Assert.assertEquals("http://cellbank.nibio.go.jp/~cellbank/en/search_res_list.cgi?KEYWOD=%s", xref.getLinkUrl());
}
Aggregations