From: Jim Procter Date: Mon, 17 Jan 2022 12:50:38 +0000 (+0000) Subject: JAL-3703 patch Windows save file test for 2.11.1 codebase X-Git-Tag: Release_2_11_1_7~1^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=128ae3671680b3c2bce1eca41919598f5ef56a4a;p=jalview.git JAL-3703 patch Windows save file test for 2.11.1 codebase --- diff --git a/test/jalview/io/WindowsFileLoadAndSaveTest.java b/test/jalview/io/WindowsFileLoadAndSaveTest.java index 2dd27b4..b644848 100644 --- a/test/jalview/io/WindowsFileLoadAndSaveTest.java +++ b/test/jalview/io/WindowsFileLoadAndSaveTest.java @@ -30,6 +30,7 @@ import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; +import jalview.bin.Cache; import jalview.datamodel.AlignmentI; import jalview.gui.AlignFrame; import jalview.gui.JvOptionPane; @@ -68,18 +69,17 @@ public class WindowsFileLoadAndSaveTest @Test(groups = { "Functional" }) public void loadAndSaveAlignment() throws IOException { + Cache.initLogger(); File file = new File(fileName); File testFile = new File(testFileName); Files.copy(file.toPath(), testFile.toPath(), StandardCopyOption.REPLACE_EXISTING); FormatAdapter fa = new FormatAdapter(); - AlignmentI a = fa.readFile(testFile, DataSourceType.FILE, + AlignmentI a = fa.readFile(fileName, DataSourceType.FILE, FileFormat.Fasta); AlignFrame af = new AlignFrame(a, 500, 500); - af.saveAlignment(testFileName, FileFormat.Fasta); - - Assert.assertTrue(af.isSaveAlignmentSuccessful()); + Assert.assertTrue(af.saveAlignment(testFileName, FileFormat.Fasta)); } @AfterClass(alwaysRun = true)