// Try a file that exists
File file = File.createTempFile(getName(), ".xml");
file.deleteOnExit();
editor.newScript(file, false);
// Default script should always get a launch + terminate
Script script = (Script)editor.getContext();
assertTrue("Script should have a launch step",
script.hasLaunch());
assertTrue("Script should have a terminate step",
script.hasTerminate());
// Try a file that doesn't exist
file = File.createTempFile(getName(), ".xml");
file.delete();
editor.newScript(file, false);
file.deleteOnExit();
script = (Script)editor.getContext();
assertTrue("Script should have a launch step",
script.hasLaunch());
assertTrue("Script should have a terminate step",
script.hasTerminate());
}