From: Jim Procter Date: Wed, 18 Jul 2018 16:20:36 +0000 (+0100) Subject: JAL-3048 test for successful save with refactored saveAlignment method X-Git-Tag: Release_2_11_4_0~45^2~18^2~535 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=494422ff62c58d14f36fc99dd1d5d1e0e949ed46;p=jalview.git JAL-3048 test for successful save with refactored saveAlignment method --- diff --git a/test/jalview/io/AnnotatedPDBFileInputTest.java b/test/jalview/io/AnnotatedPDBFileInputTest.java index c0038a1..9cd7061 100644 --- a/test/jalview/io/AnnotatedPDBFileInputTest.java +++ b/test/jalview/io/AnnotatedPDBFileInputTest.java @@ -221,8 +221,9 @@ public class AnnotatedPDBFileInputTest AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( inFile, DataSourceType.FILE); assertTrue("Didn't read input file " + inFile, af != null); + af.saveAlignment(tfile, FileFormat.Jalview); assertTrue("Failed to store as a project.", - af.saveAlignment(tfile, FileFormat.Jalview)); + af.isSaveAlignmentSuccessful()); af.closeMenuItem_actionPerformed(true); af = null; af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(tfile, diff --git a/test/jalview/io/Jalview2xmlTests.java b/test/jalview/io/Jalview2xmlTests.java index 53bb0e7..f932295 100644 --- a/test/jalview/io/Jalview2xmlTests.java +++ b/test/jalview/io/Jalview2xmlTests.java @@ -107,7 +107,8 @@ public class Jalview2xmlTests extends Jalview2xmlBase assertTrue( af.getViewport().getGlobalColourScheme() instanceof RNAHelicesColour, "Couldn't apply RNA helices colourscheme"); - assertTrue(af.saveAlignment(tfile, FileFormat.Jalview), + af.saveAlignment(tfile, FileFormat.Jalview); + assertTrue(af.isSaveAlignmentSuccessful(), "Failed to store as a project."); af.closeMenuItem_actionPerformed(true); af = null; @@ -143,7 +144,8 @@ public class Jalview2xmlTests extends Jalview2xmlBase .getAlignment(), af.getViewport().getGlobalColourScheme() .getSchemeName()), "Recognise T-Coffee score from string"); - assertTrue(af.saveAlignment(tfile, FileFormat.Jalview), + af.saveAlignment(tfile, FileFormat.Jalview); + assertTrue(af.isSaveAlignmentSuccessful(), "Failed to store as a project."); af.closeMenuItem_actionPerformed(true); af = null; @@ -188,7 +190,8 @@ public class Jalview2xmlTests extends Jalview2xmlBase sg.addSequence(af.getViewport().getAlignment().getSequenceAt(1), false); sg.addSequence(af.getViewport().getAlignment().getSequenceAt(2), true); af.alignPanel.alignmentChanged(); - assertTrue(af.saveAlignment(tfile, FileFormat.Jalview), + af.saveAlignment(tfile, FileFormat.Jalview); + assertTrue(af.isSaveAlignmentSuccessful(), "Failed to store as a project."); af.closeMenuItem_actionPerformed(true); af = null; @@ -963,7 +966,8 @@ public class Jalview2xmlTests extends Jalview2xmlBase File tfile = File.createTempFile("JalviewTest", ".jvp"); tfile.deleteOnExit(); String filePath = tfile.getAbsolutePath(); - assertTrue(af.saveAlignment(filePath, FileFormat.Jalview), + af.saveAlignment(filePath, FileFormat.Jalview); + assertTrue(af.isSaveAlignmentSuccessful(), "Failed to store as a project."); /*