X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fws%2Fdbsources%2FXfamFetcherTest.java;h=8a591b0abe6867ac10cdcb7589fe6d8570c4ac61;hb=03750f3a72c19b215f872bbdcf04585c463c6967;hp=ce4d1bca916c1e4fb675534a5776c10c8f51ab02;hpb=94204cb6f140508d5f8863fb194d0f8be1f97960;p=jalview.git diff --git a/test/jalview/ws/dbsources/XfamFetcherTest.java b/test/jalview/ws/dbsources/XfamFetcherTest.java index ce4d1bc..8a591b0 100644 --- a/test/jalview/ws/dbsources/XfamFetcherTest.java +++ b/test/jalview/ws/dbsources/XfamFetcherTest.java @@ -21,13 +21,23 @@ package jalview.ws.dbsources; import jalview.datamodel.AlignmentI; +import jalview.gui.JvOptionPane; import org.testng.Assert; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class XfamFetcherTest { - @Test(groups = { "network" }) + + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + + @Test(groups = { "External" }) public void testRfamSeed() throws Exception { // RfamFull rff = new RfamFull(); @@ -39,26 +49,36 @@ public class XfamFetcherTest Assert.assertTrue(seedrf.getHeight() > 1, "Seed Alignment for " + rfs.getTestQuery() + " didn't contain more than one sequence."); + Assert.assertTrue(seedrf.getProperties().size() > 0, + "Seed Alignment for " + rfs.getTestQuery() + + " didn't have any properties."); + } - @Test(groups = { "network" }) + @Test(groups = { "External" }) public void testPfamFullAndSeed() throws Exception { - PfamFull pff = new PfamFull(); + Pfam pff = new PfamFull(); PfamSeed pfseed = new PfamSeed(); AlignmentI fullpf = pff.getSequenceRecords(pff.getTestQuery()); Assert.assertNotNull(fullpf, "Full Alignment for " + pff.getTestQuery() + " didn't retrieve."); - Assert.assertTrue(fullpf.getHeight() > 1, - "Full Alignment for " + pff.getTestQuery() - + " didn't have more than one sequence."); + Assert.assertTrue(fullpf.getHeight() > 1, "Full Alignment for " + + pff.getTestQuery() + " didn't have more than one sequence."); AlignmentI seedpf = pfseed.getSequenceRecords(pff.getTestQuery()); Assert.assertNotNull(seedpf, "Seed Alignment for " + pff.getTestQuery() + " didn't retrieve."); + Assert.assertTrue(seedpf.getProperties().size() > 0, + "Seed Alignment for " + pfseed.getTestQuery() + + " didn't have any properties."); Assert.assertTrue(seedpf.getHeight() < fullpf.getHeight(), "Expected Full alignment to have more sequences than seed for " + pff.getTestQuery()); + Assert.assertTrue(fullpf.getProperties().size() > 0, + "Full Alignment for " + pff.getTestQuery() + + " didn't have any properties."); + } }