1 package jalview.datamodel;
3 import static org.junit.Assert.assertSame;
4 import jalview.util.MapList;
8 public class AlignedCodonFrameTest
12 * Test the constructor which copies all except the aligned protein sequences.
15 public void testConstructor_copyWithSequence()
17 AlignedCodonFrame acf = new AlignedCodonFrame();
18 MapList map = new MapList(new int[]
21 SequenceI aaseq = new Sequence("", "FKQ");
22 SequenceI dnaseq = new Sequence("", "ATTCGTACGGAC");
23 acf.addMap(dnaseq, aaseq, map);
24 SequenceI[] newaligned = new SequenceI[1];
25 newaligned[0] = new Sequence("", "-F-K-Q");
26 newaligned[0].setDatasetSequence(aaseq.getDatasetSequence());
27 AlignedCodonFrame copy = new AlignedCodonFrame(acf, newaligned);
28 assertSame(copy.getdnaSeqs(), acf.getdnaSeqs());
29 assertSame(newaligned[0], copy.getAaForDnaSeq(dnaseq, false));