use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveIntActNoEBIId.
@Test
public void testResolveIntActNoEBIId() throws Exception {
DbXref xref = createDbXref("P51610", "IntAct", "http://www.ebi.ac.uk/intact/pages/interactions/interactions.xhtml?query=%s");
Assert.assertEquals("http://www.ebi.ac.uk/intact/pages/interactions/interactions.xhtml?query=P51610", resolver.resolve(xref));
Assert.assertEquals("http://www.ebi.ac.uk/intact/pages/interactions/interactions.xhtml?query=%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveEnsemblENST.
// entry/NX_Q9BXA6/xref.json
@Test
public void testResolveEnsemblENST() throws Exception {
DbXref xref = createDbXref("ENST00000587522", "Ensembl", "whatever");
Assert.assertEquals("http://www.ensembl.org/Homo_sapiens/Transcript/Summary?db=core;t=ENST00000587522", resolver.resolve(xref));
Assert.assertEquals("http://www.ensembl.org/Homo_sapiens/Transcript/Summary?db=core;t=%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveCosmicOthers.
@Test
public void testResolveCosmicOthers() throws Exception {
DbXref xref = createDbXref("HCFC1", "Cosmic", "whatever");
Assert.assertEquals("http://cancer.sanger.ac.uk/cosmic/gene/overview?ln=HCFC1", resolver.resolve(xref));
Assert.assertEquals("http://cancer.sanger.ac.uk/cosmic/gene/overview?ln=%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveEnsemblENSG.
// entry/NX_Q9BXA6/xref.json
@Test
public void testResolveEnsemblENSG() throws Exception {
DbXref xref = createDbXref("ENSG00000178093", "Ensembl", "whatever");
Assert.assertEquals("http://www.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000178093", resolver.resolve(xref));
Assert.assertEquals("http://www.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveCGH_DBMissingDashInAccessionNumber.
@Test(expected = UnresolvedXrefURLException.class)
public void testResolveCGH_DBMissingDashInAccessionNumber() throws Exception {
DbXref xref = createDbXref("90294", "CGH-DB", "http://www.cghtmd.jp/CGHDatabase/mapViewer?hid=%s&aid=%t&lang=en");
resolver.resolve(xref);
}
Aggregations