JAL-1954 test PFAM import results in AlignmentI.hasValidSequences()==true with/out...
[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(
16             "ASEQ\t...--FFAFAFF--", AppletFormatAdapter.PASTE, "PFAM");
17     Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences");
18     Assert.assertTrue(al.hasValidSequence(),
19             "Didn't extract limits from PFAM ID");
20   }
21
22   @Test
23   public void testPfamFormatValidLimits() throws IOException
24   {
25     AlignmentI al = new jalview.io.AppletFormatAdapter()
26             .readFile("ASEQ/15-25\t...--FFAFAFF--",
27                     AppletFormatAdapter.PASTE, "PFAM");
28     Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences");
29     Assert.assertTrue(al.hasValidSequence(),
30             "Didn't extract limits from PFAM ID");
31   }
32 }