X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fws%2Fdbsources%2FXfamFetcherTest.java;h=51cff6efa0108960ac597174c8ef1e0c8735f613;hb=d7e95f458ebcbbdcc13f8b07357542ab2d7e4547;hp=c894fd1844a8bed469c9fce81f3443b08ca03168;hpb=1ce6886ff239dba3c3555aa73456269fae33d53a;p=jalview.git diff --git a/test/jalview/ws/dbsources/XfamFetcherTest.java b/test/jalview/ws/dbsources/XfamFetcherTest.java index c894fd1..51cff6e 100644 --- a/test/jalview/ws/dbsources/XfamFetcherTest.java +++ b/test/jalview/ws/dbsources/XfamFetcherTest.java @@ -21,12 +21,22 @@ 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 { + + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + @Test(groups = { "External" }) public void testRfamSeed() throws Exception { @@ -39,12 +49,16 @@ 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 = { "External" }) public void testPfamFullAndSeed() throws Exception { - PfamFull pff = new PfamFull(); + Pfam pff = new PfamFull(); PfamSeed pfseed = new PfamSeed(); AlignmentI fullpf = pff.getSequenceRecords(pff.getTestQuery()); @@ -56,9 +70,16 @@ public class XfamFetcherTest 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."); + } }