X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=test%2Fjalview%2Fgui%2FAlignViewportTest.java;h=b39b2bd70bc62bde00a37b8b5c7c5532325d2bef;hb=3899cb96ea4eeb4f528f801a87b28f5b1b453106;hp=b83e06998f3dc4d17383caa2e035a235b22be90e;hpb=52288466dd1e71946a06fd1e6ea15fa8e652c693;p=jalview.git
diff --git a/test/jalview/gui/AlignViewportTest.java b/test/jalview/gui/AlignViewportTest.java
index b83e069..b39b2bd 100644
--- a/test/jalview/gui/AlignViewportTest.java
+++ b/test/jalview/gui/AlignViewportTest.java
@@ -1,3 +1,23 @@
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
package jalview.gui;
import static org.testng.AssertJUnit.assertEquals;
@@ -17,8 +37,8 @@ import jalview.io.FileLoader;
import jalview.io.FormatAdapter;
import jalview.structure.StructureSelectionManager;
-import java.util.LinkedHashSet;
-import java.util.Set;
+import java.util.ArrayList;
+import java.util.List;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
@@ -116,7 +136,7 @@ public class AlignViewportTest
AlignedCodonFrame acf1 = new AlignedCodonFrame();
AlignedCodonFrame acf2 = new AlignedCodonFrame();
- Set mappings = new LinkedHashSet();
+ List mappings = new ArrayList();
mappings.add(acf1);
mappings.add(acf2);
af1.getViewport().getAlignment().setCodonFrames(mappings);
@@ -128,18 +148,18 @@ public class AlignViewportTest
*/
StructureSelectionManager ssm = StructureSelectionManager
.getStructureSelectionManager(Desktop.instance);
- assertEquals(2, ssm.seqmappings.size());
- assertTrue(ssm.seqmappings.contains(acf1));
- assertTrue(ssm.seqmappings.contains(acf2));
+ assertEquals(2, ssm.getSequenceMappings().size());
+ assertTrue(ssm.getSequenceMappings().contains(acf1));
+ assertTrue(ssm.getSequenceMappings().contains(acf2));
/*
* Close the second view. Verify that mappings are not removed as the first
* view still holds a reference to them.
*/
af1.closeMenuItem_actionPerformed(false);
- assertEquals(2, ssm.seqmappings.size());
- assertTrue(ssm.seqmappings.contains(acf1));
- assertTrue(ssm.seqmappings.contains(acf2));
+ assertEquals(2, ssm.getSequenceMappings().size());
+ assertTrue(ssm.getSequenceMappings().contains(acf1));
+ assertTrue(ssm.getSequenceMappings().contains(acf2));
}
/**
@@ -163,11 +183,11 @@ public class AlignViewportTest
AlignedCodonFrame acf2 = new AlignedCodonFrame();
AlignedCodonFrame acf3 = new AlignedCodonFrame();
- Set mappings1 = new LinkedHashSet();
+ List mappings1 = new ArrayList();
mappings1.add(acf1);
af1.getViewport().getAlignment().setCodonFrames(mappings1);
- Set mappings2 = new LinkedHashSet();
+ List mappings2 = new ArrayList();
mappings2.add(acf2);
mappings2.add(acf3);
af2.getViewport().getAlignment().setCodonFrames(mappings2);
@@ -176,7 +196,7 @@ public class AlignViewportTest
* AlignFrame1 has mapping acf1, AlignFrame2 has acf2 and acf3
*/
- Set ssmMappings = ssm.seqmappings;
+ List ssmMappings = ssm.getSequenceMappings();
assertEquals(0, ssmMappings.size());
ssm.registerMapping(acf1);
assertEquals(1, ssmMappings.size());
@@ -216,12 +236,12 @@ public class AlignViewportTest
AlignedCodonFrame acf2 = new AlignedCodonFrame();
AlignedCodonFrame acf3 = new AlignedCodonFrame();
- Set mappings1 = new LinkedHashSet();
+ List mappings1 = new ArrayList();
mappings1.add(acf1);
mappings1.add(acf2);
af1.getViewport().getAlignment().setCodonFrames(mappings1);
- Set mappings2 = new LinkedHashSet();
+ List mappings2 = new ArrayList();
mappings2.add(acf2);
mappings2.add(acf3);
af2.getViewport().getAlignment().setCodonFrames(mappings2);
@@ -230,7 +250,7 @@ public class AlignViewportTest
* AlignFrame1 has mappings acf1 and acf2, AlignFrame2 has acf2 and acf3
*/
- Set ssmMappings = ssm.seqmappings;
+ List ssmMappings = ssm.getSequenceMappings();
assertEquals(0, ssmMappings.size());
ssm.registerMapping(acf1);
assertEquals(1, ssmMappings.size());