JAL-3746 apply copyright to tests
[jalview.git] / test / jalview / gui / StructureViewerTest.java
index 4d5b114..ace3c9d 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
 package jalview.gui;
 
 import static org.testng.Assert.assertEquals;
@@ -39,8 +59,10 @@ public class StructureViewerTest
     PDBEntry pdbe4 = new PDBEntry("1GAQ", "A", Type.PDB, null);
     PDBEntry pdbe5 = new PDBEntry("3A6S", "B", Type.PDB, "path2");
     PDBEntry pdbe6 = new PDBEntry("1GAQ", "B", Type.PDB, null);
+    PDBEntry pdbe7 = new PDBEntry("1FOO", "Q", Type.PDB, null);
+
     PDBEntry[] pdbs = new PDBEntry[] { pdbe1, pdbe2, pdbe3, pdbe4, pdbe5,
-        pdbe6 };
+        pdbe6, pdbe7 };
 
     /*
      * seq1 ... seq6 associated with pdbe1 ... pdbe6
@@ -61,6 +83,7 @@ public class StructureViewerTest
     assertTrue(uniques.containsKey(pdbe4));
     assertFalse(uniques.containsKey(pdbe5));
     assertFalse(uniques.containsKey(pdbe6));
+    assertTrue(uniques.containsKey(pdbe7));
 
     // 1A70 associates with seq1 and seq3
     SequenceI[] ss = uniques.get(pdbe1);
@@ -79,5 +102,10 @@ public class StructureViewerTest
     assertEquals(ss.length, 2);
     assertSame(seqs[3], ss[0]);
     assertSame(seqs[5], ss[1]);
+
+    // 1FOO has seq7
+    ss = uniques.get(pdbe7);
+    assertEquals(ss.length, 1);
+    assertSame(seqs[6], ss[0]);
   }
 }