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--", AppletFormatAdapter.PASTE, "PFAM");
+ + '\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");
@Test(groups = "Functional")
public void testPfamFormatValidLimits() throws IOException
{
- AlignmentI al = new AppletFormatAdapter().readFile(
- "ASEQ/15-25" + '\t' + "...--FFAFAFF--",
- AppletFormatAdapter.PASTE, "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");