From ab24e67378e61c3ba70fd3bc557259112a87b3ca Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 28 Oct 2015 14:19:02 +0000 Subject: [PATCH] JAL-1954 test PFAM import results in AlignmentI.hasValidSequences()==true with/out limits. --- test/jalview/io/PfamFormatInputTest.java | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 test/jalview/io/PfamFormatInputTest.java diff --git a/test/jalview/io/PfamFormatInputTest.java b/test/jalview/io/PfamFormatInputTest.java new file mode 100644 index 0000000..46e5af7 --- /dev/null +++ b/test/jalview/io/PfamFormatInputTest.java @@ -0,0 +1,32 @@ +package jalview.io; + +import jalview.datamodel.AlignmentI; + +import java.io.IOException; + +import org.testng.Assert; +import org.testng.annotations.Test; + +public class PfamFormatInputTest +{ + @Test + public void testPfamFormatNoLimits() throws IOException + { + AlignmentI al = new jalview.io.AppletFormatAdapter().readFile( + "ASEQ\t...--FFAFAFF--", AppletFormatAdapter.PASTE, "PFAM"); + Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences"); + Assert.assertTrue(al.hasValidSequence(), + "Didn't extract limits from PFAM ID"); + } + + @Test + public void testPfamFormatValidLimits() throws IOException + { + AlignmentI al = new jalview.io.AppletFormatAdapter() + .readFile("ASEQ/15-25\t...--FFAFAFF--", + AppletFormatAdapter.PASTE, "PFAM"); + Assert.assertEquals(1, al.getHeight(), "Wrong number of sequences"); + Assert.assertTrue(al.hasValidSequence(), + "Didn't extract limits from PFAM ID"); + } +} -- 1.7.10.2