3 import static org.testng.Assert.assertEquals;
4 import static org.testng.Assert.assertNull;
6 import jalview.datamodel.PDBEntry;
7 import jalview.datamodel.PDBEntry.Type;
9 import org.testng.annotations.Test;
11 public class StructureViewerTest
13 @Test(groups = "Functional")
14 public void testGetUniquePdbFiles()
16 assertNull(StructureViewer.getUniquePdbFiles(null));
18 PDBEntry pdbe1 = new PDBEntry("1A70", "A", Type.PDB, "path1");
19 PDBEntry pdbe2 = new PDBEntry("3A6S", "A", Type.PDB, "path2");
20 PDBEntry pdbe3 = new PDBEntry("1A70", "B", Type.PDB, "path1");
21 PDBEntry pdbe4 = new PDBEntry("1GAQ", "A", Type.PDB, null);
22 PDBEntry pdbe5 = new PDBEntry("3A6S", "B", Type.PDB, "path2");
23 PDBEntry pdbe6 = new PDBEntry("1GAQ", "B", Type.PDB, null);
26 * pdbe2 and pdbe5 get removed as having a duplicate file path
28 PDBEntry[] uniques = StructureViewer.getUniquePdbFiles(new PDBEntry[] {
29 pdbe1, pdbe2, pdbe3, pdbe4, pdbe5, pdbe6 });
31 new PDBEntry[] { pdbe1, pdbe2, pdbe4, pdbe6 });