JAL-2068 minimised jalview.gui imports, test for removeAnnotation
[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--", 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().readFile(
26             "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 }