1 package jalview.datamodel;
3 import static org.junit.Assert.assertEquals;
4 import static org.junit.Assert.assertSame;
5 import jalview.util.MapList;
9 public class AlignedCodonFrameTest
13 * Test the constructor which copies all except the aligned protein sequences.
16 public void testConstructor_copyWithSequence()
18 AlignedCodonFrame acf = new AlignedCodonFrame(0);
19 acf.codons = new int[][]
23 MapList map = new MapList(new int[]
26 SequenceI aaseq = new Sequence("", "FKQ");
27 SequenceI dnaseq = new Sequence("", "ATTCGTACGGAC");
28 acf.addMap(dnaseq, aaseq, map);
29 SequenceI[] newaligned = new SequenceI[1];
30 newaligned[0] = new Sequence("", "-F-K-Q");
31 newaligned[0].setDatasetSequence(aaseq.getDatasetSequence());
32 AlignedCodonFrame copy = new AlignedCodonFrame(acf, newaligned);
33 assertSame(copy.codons, acf.codons);
34 assertEquals(copy.aaWidth, acf.aaWidth);
35 assertSame(copy.getdnaSeqs(), acf.getdnaSeqs());
36 assertSame(newaligned[0], copy.getAaForDnaSeq(dnaseq, false));