// reset mock response
JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
// close desktop windows/frames
- Desktop.instance.closeAll_actionPerformed(null);
+ if (Desktop.instance != null)
+ Desktop.instance.closeAll_actionPerformed(null);
// reset debug delay
Jalview2XML.setDebugDelaySave(20);
}
// reset mock response
JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
// close desktop windows/frames
- Desktop.instance.closeAll_actionPerformed(null);
+ if (Desktop.instance != null)
+ Desktop.instance.closeAll_actionPerformed(null);
// reset debug delay
Cache.setProperty("DEBUG_DELAY_SAVE", "false");
Jalview2XML.setDebugDelaySave(3);
Assert.assertTrue(end - start < 500,
"Quit-with-no-save-needed took too long (" + (end - start)
+ "ms)");
- Desktop.instance.closeAll_actionPerformed(null);
}
@Test(groups = { "Functional" }, singleThreaded = true, priority = 10)
Assert.assertEquals(response, QResponse.QUIT);
Assert.assertTrue(end - start > 2900,
"Quit-whilst-saving was too short (" + (end - start) + "ms)");
-
- Desktop.instance.closeAll_actionPerformed(null);
}
@Test(groups = { "Functional" }, singleThreaded = true, priority = 9)
// if not saved this would be CANCEL_QUIT
Assert.assertEquals(response, QResponse.QUIT);
- Desktop.instance.closeAll_actionPerformed(null);
}
@Test(groups = { "Functional" }, singleThreaded = true, priority = 9)
// if not saved this would be CANCEL_QUIT
Assert.assertEquals(response, QResponse.QUIT);
- Desktop.instance.closeAll_actionPerformed(null);
}
@Test(groups = { "Functional" }, singleThreaded = true, priority = 1)
QResponse response = QuitHandler.getQuitResponse(true);
Assert.assertEquals(response, QResponse.CANCEL_QUIT);
- Desktop.instance.closeAll_actionPerformed(null);
}
@Test(groups = { "Functional" }, singleThreaded = true, priority = 1)
QResponse response = QuitHandler.getQuitResponse(false);
Assert.assertEquals(response, QResponse.QUIT);
- Desktop.instance.closeAll_actionPerformed(null);
}
@Test(groups = { "Functional" }, singleThreaded = true, priority = 11)
"Force-Quit-whilst-saving was too long (" + (end - start)
+ "ms)");
- Desktop.instance.closeAll_actionPerformed(null);
}
}