From d409c3ae8f396eec23dae4c9ca03b28314969466 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sun, 4 Sep 2016 13:11:44 +0100 Subject: [PATCH] JAL-1803 patch test: PDBEntry.getFile() will always be different, but never null --- test/jalview/io/Jalview2xmlTests.java | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) 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"); + } } } -- 1.7.10.2