file format enum wip changes
[jalview.git] / test / jalview / io / PfamFormatInputTest.java
1 package jalview.io;
2
3 import jalview.datamodel.AlignmentI;
4
5 import java.io.IOException;
6
7 import org.testng.Assert;
8 import org.testng.annotations.Test;
9
10 public class PfamFormatInputTest
11 {
12   @Test
13   public void testPfamFormatNoLimits() throws IOException
14   {
15     AlignmentI al = new jalview.io.AppletFormatAdapter().readFile("ASEQ"
16             + '\t' + "...--FFAFAFF--", DataSourceType.PASTE,
17             FileFormat.Pfam);
18     Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences");
19     Assert.assertTrue(al.hasValidSequence(),
20             "Didn't extract limits from PFAM ID");
21   }
22
23   @Test
24   public void testPfamFormatValidLimits() throws IOException
25   {
26     AlignmentI al = new jalview.io.AppletFormatAdapter().readFile(
27             "ASEQ/15-25" + '\t' + "...--FFAFAFF--",
28  DataSourceType.PASTE,
29             FileFormat.Pfam);
30     Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences");
31     Assert.assertTrue(al.hasValidSequence(),
32             "Didn't extract limits from PFAM ID");
33   }
34 }