@AfterMethod(alwaysRun = true)
public void tearDown()
{
- if (Desktop.instance != null)
- Desktop.instance.closeAll_actionPerformed(null);
+ Desktop.closeDesktop();
+ }
+
+ public static void callJalviewMain(String[] args) {
+ if (Jalview.getInstance()!=null) {
+ Jalview.getInstance().doMain(args);
+ } else {
+ Jalview.main(args);
+ }
}
/* --setprops is currently disabled so this test won't work
int numFrames, String[] sequences)
{
String[] args = (cmdLine + " --gui").split("\\s+");
- Jalview.main(args);
+ callJalviewMain(args);
Commands cmds = Jalview.getInstance().getCommands();
Assert.assertNotNull(cmds);
Assert.assertEquals(cmds.commandArgsProvided(), cmdArgs,
{
cleanupFiles(filenames);
String[] args = (cmdLine + " --gui").split("\\s+");
- Jalview.main(args);
+ callJalviewMain(args);
Commands cmds = Jalview.getInstance().getCommands();
Assert.assertNotNull(cmds);
File lastFile = null;
{
cleanupFiles(filenames);
String[] args = (cmdLine + " --gui").split("\\s+");
- Jalview.main(args);
+ callJalviewMain(args);
Commands cmds = Jalview.getInstance().getCommands();
Assert.assertNotNull(cmds);
File lastFile = null;
String[] nonfilenames)
{
String[] args = (cmdLine + " --gui").split("\\s+");
- Jalview.main(args);
+ callJalviewMain(args);
Commands cmds = Jalview.getInstance().getCommands();
Assert.assertNotNull(cmds);
for (String filename : filenames)