X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fio%2FPfamFormatInputTest.java;h=c91f8d7933033b31be72b08258a036f4215c7bdf;hb=20d8cc2bb3e2fab2b7f637a3d523c90ceb58903d;hp=f0986af595066839c0f04c22c612b4e8e7c62c89;hpb=7d67fb613ec026dc9a265e351e7fab542e3f1d61;p=jalview.git diff --git a/test/jalview/io/PfamFormatInputTest.java b/test/jalview/io/PfamFormatInputTest.java index f0986af..c91f8d7 100644 --- a/test/jalview/io/PfamFormatInputTest.java +++ b/test/jalview/io/PfamFormatInputTest.java @@ -21,19 +21,29 @@ package jalview.io; import jalview.datamodel.AlignmentI; +import jalview.gui.JvOptionPane; import java.io.IOException; import org.testng.Assert; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class PfamFormatInputTest { + + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + @Test(groups = "Functional") public void testPfamFormatNoLimits() throws IOException { - AlignmentI al = new AppletFormatAdapter().readFile("ASEQ" - + '\t' + "...--FFAFAFF--", DataSourceType.PASTE, + AlignmentI al = new AppletFormatAdapter().readFile( + "ASEQ" + '\t' + "...--FFAFAFF--", DataSourceType.PASTE, FileFormat.Pfam); Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences"); Assert.assertTrue(al.hasValidSequence(), @@ -43,8 +53,9 @@ public class PfamFormatInputTest @Test(groups = "Functional") public void testPfamFormatValidLimits() throws IOException { - AlignmentI al = new AppletFormatAdapter().readFile("ASEQ/15-25" + '\t' - + "...--FFAFAFF--", DataSourceType.PASTE, FileFormat.Pfam); + AlignmentI al = new AppletFormatAdapter().readFile( + "ASEQ/15-25" + '\t' + "...--FFAFAFF--", DataSourceType.PASTE, + FileFormat.Pfam); Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences"); Assert.assertTrue(al.hasValidSequence(), "Didn't extract limits from PFAM ID");