X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fgui%2FStructureViewerTest.java;h=ace3c9dc6b1462947d812591795063622b84d093;hb=e9a1c2c372f4bbf6cf658de3dba73ef326b20c20;hp=4d5b11480adb0951ee97a44bd99c60efaa39251a;hpb=f8b17a9e7363b8a9e7cd12d61bc6d611c7c97d7d;p=jalview.git diff --git a/test/jalview/gui/StructureViewerTest.java b/test/jalview/gui/StructureViewerTest.java index 4d5b114..ace3c9d 100644 --- a/test/jalview/gui/StructureViewerTest.java +++ b/test/jalview/gui/StructureViewerTest.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.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]); } }