From: Jim Procter Date: Sun, 28 Jun 2015 16:21:31 +0000 (+0100) Subject: JAL-1705 test that the regex correctly processes ENSEMBL test IDs X-Git-Tag: Release_2_10_0~296^2~90^2~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9238f37da75fca644d970371f6b8e99144070bce;p=jalview.git JAL-1705 test that the regex correctly processes ENSEMBL test IDs --- diff --git a/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java b/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java index 7e8745e..b456919 100644 --- a/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java +++ b/test/jalview/ext/ensembl/EnsemblSeqProxyTest.java @@ -155,4 +155,31 @@ public class EnsemblSeqProxyTest } } + + @Test(dataProvider = "ens_seqs") + public void testRegexForProxy(EnsemblSeqType type, String sq, + String fastasq) throws Exception + { + EnsemblSeqProxy esq = new EnsemblProtein(); + Assert.assertTrue(esq.isValidReference(sq), + "Expected reference string " + sq + " to be valid for regex " + + esq.getAccessionValidator().toString()); + + Assert.assertEquals(sq, DBRefUtils.processQueryToAccessionFor(esq, sq), + "Regex for " + esq.getClass().toString() + " not correct."); + } + // @Test(dataProvider = "ens_seqs", suiteName = "live") + // public void testGetOneSeqs(EnsemblSeqType type, String sq, String fastasq) + // throws Exception + // { + // + // { + // Assert.assertTrue(rseq[0].getDBRef() != null + // && rseq[0].getDBRef().length > 0, + // "No database references added to sequence by fetcher."); + // Assert.assertNotNull(DBRefUtils.searchRefs(rseq[0].getDBRef(), + // new DBRefEntry("ENSEMBL", null, sq)), + // "Could't find database references added to sequence by fetcher."); + // + // } } \ No newline at end of file