X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fio%2FJalviewExportPropertiesTests.java;h=06d177dca2bb622cd659499746aeef8d5063b325;hb=08f7a2be3977da8704dd4751de7245bcc6fc41c3;hp=4ea85f4f054ae05beef357cae882c3e834493d80;hpb=838e4f91d4a53dd315640dbc9ff6ef7a815ee576;p=jalview.git diff --git a/test/jalview/io/JalviewExportPropertiesTests.java b/test/jalview/io/JalviewExportPropertiesTests.java index 4ea85f4..06d177d 100644 --- a/test/jalview/io/JalviewExportPropertiesTests.java +++ b/test/jalview/io/JalviewExportPropertiesTests.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -24,6 +24,7 @@ import static org.testng.AssertJUnit.assertTrue; import jalview.datamodel.SequenceGroup; import jalview.gui.AlignFrame; +import jalview.gui.JvOptionPane; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -39,6 +40,13 @@ import org.testng.annotations.Test; public class JalviewExportPropertiesTests { + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + /** * @throws java.lang.Exception */ @@ -52,7 +60,7 @@ public class JalviewExportPropertiesTests /** * @throws java.lang.Exception */ - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { jalview.gui.Desktop.instance.closeAll_actionPerformed(null); @@ -66,7 +74,7 @@ public class JalviewExportPropertiesTests assertTrue("Couldn't set gap character to '.'", ".".equals("" + jalview.bin.Cache.getProperty("GAP_SYMBOL"))); AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( - "examples/uniref50.fa", FormatAdapter.FILE); + "examples/uniref50.fa", DataSourceType.FILE); assertTrue("Didn't read in the example file correctly.", af != null); assertTrue("Didn't set the gap character correctly", af.getViewport() .getAlignment().getSequenceAt(0).getCharAt(5) == '.'); @@ -78,7 +86,7 @@ public class JalviewExportPropertiesTests sg.setEndRes(7); af.getViewport().setSelectionGroup(sg); String fseqs = new FormatAdapter(af.alignPanel).formatSequences( - "FASTA", af.alignPanel, true); + FileFormat.Fasta, af.alignPanel, true); assertTrue("Couldn't find '.' in the exported region\n" + fseqs, fseqs.indexOf(".") > -1); }