From: Jim Procter Date: Tue, 21 Jun 2016 09:19:17 +0000 (+0100) Subject: JAL-1369 fix the test X-Git-Tag: Release_2_10_0~161^2~5^2~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a48afe258cf59d955fc1cd0cc73459b94e45b029;p=jalview.git JAL-1369 fix the test --- diff --git a/test/jalview/io/Jalview2xmlTests.java b/test/jalview/io/Jalview2xmlTests.java index 21bf846..8ef6ef4 100644 --- a/test/jalview/io/Jalview2xmlTests.java +++ b/test/jalview/io/Jalview2xmlTests.java @@ -464,15 +464,20 @@ public class Jalview2xmlTests { AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( tfile.getAbsolutePath(), FormatAdapter.FILE); + afid = af.getViewport().getSequenceSetId(); } - for (AlignmentViewPanel ap : Desktop.getAlignmentPanels(Desktop - .getAlignFrames()[0].getViewport().getSequenceSetId())) + for (AlignmentViewPanel ap : Desktop.getAlignmentPanels(afid)) { // check representative SequenceI rep = ap.getAlignment().getSeqrep(); Assert.assertNotNull(rep, "Couldn't restore sequence representative from project"); - Assert.assertEquals(refs.get(ap.getViewName()), rep, + // can't use a strong equals here, because by definition, the sequence IDs + // will be different. + // could set vamsas session save/restore flag to preserve IDs across + // load/saves. + Assert.assertEquals(refs.get(ap.getViewName()).toString(), + rep.toString(), "Representative wasn't the same when recovered."); Assert.assertTrue(ap.getAlignViewport().isDisplayReferenceSeq(), "Display reference sequence view setting not set.");