From a48afe258cf59d955fc1cd0cc73459b94e45b029 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 21 Jun 2016 10:19:17 +0100 Subject: [PATCH] JAL-1369 fix the test --- test/jalview/io/Jalview2xmlTests.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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."); -- 1.7.10.2