From: Jim Procter Date: Sun, 4 Sep 2016 12:11:44 +0000 (+0100) Subject: JAL-1803 patch test: PDBEntry.getFile() will always be different, but never null X-Git-Tag: Release_2_10_0~47^2~4^2~20 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d409c3ae8f396eec23dae4c9ca03b28314969466;p=jalview.git JAL-1803 patch test: PDBEntry.getFile() will always be different, but never null --- diff --git a/test/jalview/io/Jalview2xmlTests.java b/test/jalview/io/Jalview2xmlTests.java index f7853ff..39d2c89 100644 --- a/test/jalview/io/Jalview2xmlTests.java +++ b/test/jalview/io/Jalview2xmlTests.java @@ -713,13 +713,19 @@ public class Jalview2xmlTests extends Jalview2xmlBase // The Asserts below are expected to fail until the PDB chainCode is // recoverable from a Jalview projects - Assert.assertTrue(rseqs[0].getDatasetSequence().getAllPDBEntries() - .get(0).equals(pdbEntries[0])); - Assert.assertTrue(rseqs[1].getDatasetSequence().getAllPDBEntries() - .get(0).equals(pdbEntries[1])); - Assert.assertTrue(rseqs[2].getDatasetSequence().getAllPDBEntries() - .get(0).equals(pdbEntries[2])); - Assert.assertTrue(rseqs[3].getDatasetSequence().getAllPDBEntries() - .get(0).equals(pdbEntries[3])); + for (int chain = 0; chain < 4; chain++) + { + PDBEntry recov = rseqs[chain].getDatasetSequence().getAllPDBEntries() + .get(0); + PDBEntry expected = pdbEntries[chain]; + Assert.assertEquals(recov.getId(), expected.getId(), + "Mismatch PDB ID"); + Assert.assertEquals(recov.getChainCode(), expected.getChainCode(), + "Mismatch PDB ID"); + Assert.assertEquals(recov.getType(), expected.getType(), + "Mismatch PDBEntry 'Type'"); + Assert.assertNotNull(recov.getFile(), + "Recovered PDBEntry should have a non-null file entry"); + } } }