34ae6121ae6e11f644223724aaa4bc06b8475bc9
[jalview.git] / test / jalview / analysis / AlignSeqTest.java
1 package jalview.analysis;
2
3 import static org.junit.Assert.assertEquals;
4 import static org.junit.Assert.assertNull;
5
6 import org.testng.annotations.Test;
7
8 public class AlignSeqTest
9 {
10   @Test(groups ={ "Functional" })
11   public void testExtractGaps()
12   {
13     assertNull(AlignSeq.extractGaps(null, null));
14     assertNull(AlignSeq.extractGaps(null, "ACG"));
15     assertNull(AlignSeq.extractGaps("-. ", null));
16
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"));
22   }
23 }