X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fext%2Fjmol%2FJmolViewerTest.java;h=792f7ad8fb4c9d62e7a3b4392915a3548371d9da;hb=136c0793b90b72b928c4d77dc109dd5c644e00d3;hp=93def6e4c1218e28446c2171e8489bcff6f68ce5;hpb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;p=jalview.git diff --git a/test/jalview/ext/jmol/JmolViewerTest.java b/test/jalview/ext/jmol/JmolViewerTest.java index 93def6e..792f7ad 100644 --- a/test/jalview/ext/jmol/JmolViewerTest.java +++ b/test/jalview/ext/jmol/JmolViewerTest.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) - * 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,12 +24,14 @@ import static org.testng.AssertJUnit.assertTrue; import jalview.api.structures.JalviewStructureDisplayI; import jalview.bin.Cache; +import jalview.bin.Jalview; import jalview.datamodel.SequenceI; import jalview.gui.AlignFrame; +import jalview.gui.JvOptionPane; import jalview.gui.Preferences; import jalview.gui.StructureViewer; import jalview.gui.StructureViewer.ViewerType; -import jalview.io.FormatAdapter; +import jalview.io.DataSourceType; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; @@ -39,21 +41,27 @@ import org.testng.annotations.Test; public class JmolViewerTest { + @BeforeClass(alwaysRun = true) + public void setUpJvOptionPane() + { + JvOptionPane.setInteractiveMode(false); + JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); + } + /** * @throws java.lang.Exception */ @BeforeClass(alwaysRun = true) public static void setUpBeforeClass() throws Exception { - jalview.bin.Jalview.main(new String[] { - "-noquestionnaire -nonews -props", + Jalview.main(new String[] { "-noquestionnaire", "-nonews", "-props", "test/jalview/ext/rbvi/chimera/testProps.jvprops" }); } /** * @throws java.lang.Exception */ - @AfterClass + @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { jalview.gui.Desktop.instance.closeAll_actionPerformed(null); @@ -65,7 +73,7 @@ public class JmolViewerTest Cache.setProperty(Preferences.STRUCTURE_DISPLAY, ViewerType.JMOL.name()); String inFile = "examples/1gaq.txt"; AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( - inFile, FormatAdapter.FILE); + inFile, DataSourceType.FILE); assertTrue("Didn't read input file " + inFile, af != null); for (SequenceI sq : af.getViewport().getAlignment().getSequences()) { @@ -107,4 +115,6 @@ public class JmolViewerTest } } } + + }