JAL-2113 embl_mapping.xml and code updated for EMBL XML v1.2
[jalview.git] / test / jalview / datamodel / xdb / embl / EmblEntryTest.java
1 package jalview.datamodel.xdb.embl;
2
3 import static org.testng.AssertJUnit.assertEquals;
4
5 import java.util.Arrays;
6 import java.util.Vector;
7
8 import org.testng.annotations.Test;
9
10 public class EmblEntryTest
11 {
12   @Test(groups = "Functional")
13   public void testGetCdsRanges()
14   {
15     EmblEntry testee = new EmblEntry();
16
17     /*
18      * Make a (CDS) Feature with 4 locations
19      */
20     EmblFeature cds = new EmblFeature();
21     cds.setLocation("join(10..20,complement(30..40),50..60,70..80,complement(join(90..100,110..120)))");
22
23     int[] exons = testee.getCdsRanges(cds);
24     assertEquals("[10, 20, 40, 30, 50, 60, 70, 80, 120, 110, 100, 90]",
25             Arrays.toString(exons));
26   }
27 }