2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.datamodel;
23 import static org.testng.AssertJUnit.assertTrue;
25 import org.testng.annotations.AfterMethod;
26 import org.testng.annotations.BeforeMethod;
27 import org.testng.annotations.Test;
29 public class PDBEntryTest
32 @BeforeMethod(alwaysRun = true)
33 public void setUp() throws Exception
37 @AfterMethod(alwaysRun = true)
38 public void tearDown() throws Exception
42 @Test(groups = { "Functional" })
48 PDBEntry pdbEntry = new PDBEntry("1xyz", "A", PDBEntry.Type.PDB,
51 PDBEntry case1 = new PDBEntry("1XYZ", "A", PDBEntry.Type.PDB,
53 PDBEntry case2 = new PDBEntry("1xyz", "a", PDBEntry.Type.PDB,
55 PDBEntry case3 = new PDBEntry("1xyz", "A", PDBEntry.Type.FILE,
57 PDBEntry case4 = new PDBEntry(null, null, null, null);
58 PDBEntry case5 = new PDBEntry(null, "A", PDBEntry.Type.PDB,
60 PDBEntry case6 = new PDBEntry("1xyz", null, PDBEntry.Type.PDB,
62 PDBEntry case7 = new PDBEntry("1xyz", "A", null, "x/y/z/File");
63 PDBEntry case8 = new PDBEntry("1xyz", "A", PDBEntry.Type.PDB, null);
64 PDBEntry case9 = new PDBEntry("1xyz", "A", null, "x/y/z/File");
66 // System.out.println(">>>> Testing case 1");
67 assertTrue(pdbEntry.equals(case1));
68 // System.out.println(">>>> Testing case 2");
69 assertTrue(pdbEntry.equals(case2));
70 // System.out.println(">>>> Testing case 3");
71 assertTrue(!pdbEntry.equals(case3));
72 // System.out.println(">>>> Testing case 4");
73 assertTrue(!pdbEntry.equals(case4));
74 // System.out.println(">>>> Testing case 5");
75 assertTrue(!pdbEntry.equals(case5));
76 // System.out.println(">>>> Testing case 6");
77 assertTrue(!pdbEntry.equals(case6));
78 // System.out.println(">>>> Testing case 7");
79 assertTrue(!pdbEntry.equals(case7));
80 // System.out.println(">>>> Testing case 8");
81 assertTrue(pdbEntry.equals(case8));
82 assertTrue(pdbEntry.equals(case8));
83 assertTrue(case7.equals(case9));