1 package jalview.analysis;
3 import static org.junit.Assert.assertEquals;
4 import static org.junit.Assert.assertNull;
6 import org.testng.annotations.Test;
8 public class AlignSeqTest
10 @Test(groups ={ "Functional" })
11 public void testExtractGaps()
13 assertNull(AlignSeq.extractGaps(null, null));
14 assertNull(AlignSeq.extractGaps(null, "ACG"));
15 assertNull(AlignSeq.extractGaps("-. ", null));
17 assertEquals(" AC-G.T", AlignSeq.extractGaps("", " AC-G.T"));
18 assertEquals("AC-G.T", AlignSeq.extractGaps(" ", " AC-G.T"));
19 assertEquals("ACG.T", AlignSeq.extractGaps(" -", " AC-G.T"));
20 assertEquals("ACGT", AlignSeq.extractGaps(" -.", " AC-G.T ."));
21 assertEquals(" ACG.T", AlignSeq.extractGaps("-", " AC-G.T"));