From: Jim Procter Date: Thu, 23 Jun 2016 13:09:36 +0000 (+0100) Subject: JAL-2110 enable and fix failing tests X-Git-Tag: Release_2_10_0~140^2~5^2~43 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5e465e49761f5bd3618bb5670ad5d4b2f0f4faec;p=jalview.git JAL-2110 enable and fix failing tests --- diff --git a/test/jalview/analysis/CrossRefTest.java b/test/jalview/analysis/CrossRefTest.java index abe713a..c2d7ca6 100644 --- a/test/jalview/analysis/CrossRefTest.java +++ b/test/jalview/analysis/CrossRefTest.java @@ -149,7 +149,7 @@ public class CrossRefTest * xref is found - not on the nucleotide sequence but on a peptide sequence in * the alignment which which it shares a nucleotide dbref */ - @Test(groups = { "Functional" }, enabled = false) + @Test(groups = { "Functional" }, enabled = true) public void testFindXrefSequences_indirectDbrefToProtein() { /* @@ -180,7 +180,7 @@ public class CrossRefTest * xref is found - not on the peptide sequence but on a nucleotide sequence in * the alignment which which it shares a protein dbref */ - @Test(groups = { "Functional" }, enabled = false) + @Test(groups = { "Functional" }, enabled = true) public void testFindXrefSequences_indirectDbrefToNucleotide() { /* @@ -193,7 +193,7 @@ public class CrossRefTest SequenceI emblSeq = new Sequence("AF039662", "GGGGCAGCACAAGAAC"); emblSeq.addDBRef(new DBRefEntry("EMBL", "0", "AF039662")); emblSeq.addDBRef(new DBRefEntry("UNIPROT", "0", "Q9ZTS2")); - + /* * find EMBL xrefs for peptide sequence - it has no direct * dbrefs, but the 'corresponding' nucleotide sequence does, so is returned @@ -204,9 +204,8 @@ public class CrossRefTest * - but nucleotide with matching peptide dbref does, so is returned */ AlignmentI al = new Alignment(new SequenceI[] { emblSeq, uniprotSeq }); - Alignment xrefs = new CrossRef(new SequenceI[] { uniprotSeq }, - al) - .findXrefSequences("EMBL", true); + Alignment xrefs = new CrossRef(new SequenceI[] { uniprotSeq }, al) + .findXrefSequences("EMBL", false); assertEquals(1, xrefs.getHeight()); assertSame(emblSeq, xrefs.getSequenceAt(0)); } @@ -225,7 +224,7 @@ public class CrossRefTest SequenceI dna1 = new Sequence("AF039662", "GGGGCAGCACAAGAAC"); dna1.addDBRef(new DBRefEntry("UNIPROT", "0", "Q9ZTS2")); SequenceI dna2 = new Sequence("AJ307031", "AAACCCTTT"); - + /* * find UNIPROT xrefs for peptide sequence - it has no direct * dbrefs, and the other sequence (which has a UNIPROT dbref) is not @@ -241,7 +240,7 @@ public class CrossRefTest * Tests for the method that searches an alignment (with one sequence * excluded) for protein/nucleotide sequences with a given cross-reference */ - @Test(groups = { "Functional" }, enabled = false) + @Test(groups = { "Functional" }, enabled = true) public void testSearchDataset() { /* @@ -274,7 +273,9 @@ public class CrossRefTest * search for a protein sequence with dbref UNIPROT:Q9ZTS2 */ dbref = new DBRefEntry("UNIPROT", "0", "Q9ZTS2"); - found = testee.searchDataset(true, dna1, dbref, result, null, true); + found = testee.searchDataset(!dna1.isProtein(), dna1, dbref, result, + null, false); // search dataset with a protein xref from a dna + // sequence to locate the protein product assertTrue(found); assertEquals(1, result.size()); assertSame(pep1, result.get(0)); @@ -284,7 +285,9 @@ public class CrossRefTest */ result.clear(); dbref = new DBRefEntry("UNIPROT", "0", "Q9ZTS2"); - found = testee.searchDataset(false, pep1, dbref, result, null, false); + found = testee.searchDataset(!pep1.isProtein(), pep1, dbref, result, + null, false); // search dataset with a protein's direct dbref to + // locate dna sequences with matching xref assertTrue(found); assertEquals(1, result.size()); assertSame(dna1, result.get(0));