X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=test%2FMCview%2FPDBfileTest.java;h=2ac1c6e1d254829a3da7ad2f0a0a37659fe6e2df;hb=c19d2a91ca05e052e3408bf5852d88eb5d0608f1;hp=1dfeba9826eda7117336eacf362435219f573933;hpb=fddf3084802b37e5cee17829e32692a4aac3e60d;p=jalview.git diff --git a/test/MCview/PDBfileTest.java b/test/MCview/PDBfileTest.java index 1dfeba9..2ac1c6e 100644 --- a/test/MCview/PDBfileTest.java +++ b/test/MCview/PDBfileTest.java @@ -1,3 +1,23 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) + * Copyright (C) 2015 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 MCview; import static org.testng.AssertJUnit.assertEquals; @@ -21,7 +41,7 @@ import org.testng.annotations.Test; public class PDBfileTest { - @Test(groups ={ "Functional" }) + @Test(groups = { "Functional" }) public void testIsRna() { SequenceI seq = new Sequence("Seq1", "CGAU"); @@ -43,7 +63,7 @@ public class PDBfileTest * * @throws IOException */ - @Test(groups ={ "Functional" }) + @Test(groups = { "Functional" }) public void testParse() throws IOException { /* @@ -71,8 +91,8 @@ public class PDBfileTest assertTrue(chainA.sequence.getSequenceAsString().endsWith("WNVEVY")); assertEquals("3W5V|A", chainA.sequence.getName()); assertNull(chainA.sequence.getAnnotation()); - assertEquals(1, chainA.sequence.getPDBId().size()); - PDBEntry pdb = chainA.sequence.getPDBId().get(0); + assertEquals(1, chainA.sequence.getAllPDBEntries().size()); + PDBEntry pdb = chainA.sequence.getAllPDBEntries().get(0); assertEquals("A", pdb.getChainCode()); assertEquals("PDB", pdb.getType()); assertEquals("3W5V", pdb.getId()); @@ -107,8 +127,8 @@ public class PDBfileTest assertEquals("3W5V|B", seqs.get(1).getName()); assertEquals("3W5V|C", seqs.get(2).getName()); assertEquals("3W5V|D", seqs.get(3).getName()); - assertEquals(1, seqs.get(0).getPDBId().size()); - PDBEntry pdbe = seqs.get(0).getPDBId().get(0); + assertEquals(1, seqs.get(0).getAllPDBEntries().size()); + PDBEntry pdbe = seqs.get(0).getAllPDBEntries().get(0); assertEquals("A", pdbe.getChainCode()); assertEquals("3W5V", pdbe.getId()); assertEquals(PDBEntry.Type.PDB.toString(), pdbe.getType()); @@ -120,7 +140,7 @@ public class PDBfileTest * * @throws IOException */ - @Test(groups ={ "Functional" }) + @Test(groups = { "Functional" }) public void testParse_withAnnotations_noSS() throws IOException { PDBfile pf = new PDBfile(true, false, false, "examples/3W5V.pdb", @@ -178,7 +198,7 @@ public class PDBfileTest * * @throws IOException */ - @Test(groups ={ "Functional" }) + @Test(groups = { "Functional" }) public void testParse_withJmol_noAnnotations() throws IOException { PDBfile pf = new PDBfile(false, true, false, "examples/3W5V.pdb", @@ -207,7 +227,7 @@ public class PDBfileTest * * @throws IOException */ - @Test(groups ={ "Functional" }) + @Test(groups = { "Functional" }) public void testParse_withJmolAddAlignmentAnnotations() throws IOException { @@ -264,8 +284,7 @@ public class PDBfileTest * @throws IOException */ - @Test(groups = - { "Functional" }, enabled = false) + @Test(groups = { "Functional" }, enabled = false) public void testParse_withAnnotate3D() throws IOException { // TODO requires a mock for Annotate3D processing @@ -273,6 +292,7 @@ public class PDBfileTest PDBfile pf = new PDBfile(true, true, true, "examples/2GIS.pdb", AppletFormatAdapter.FILE); } + /** * Helper method to extract parsed annotations from the PDBfile * @@ -285,4 +305,4 @@ public class PDBfileTest pf.addAnnotations(al); return al.getAlignmentAnnotation(); } - } +}