Package abbot.script

Examples of abbot.script.Script


        hierarchy = createHierarchy();

        finder = new BasicFinder(hierarchy);
        // FIXME kind of a hack, but Script is the only implementation of
        // Resolver we've got at the moment.
        resolver = new Script(hierarchy);
    }
View Full Code Here


        // preventing exits
        System.setSecurityManager(null);
    }

    public void testSaveNestedScripts() throws Throwable {
        Script s1 = new Script(getHierarchy());
        Script s2 = new Script(getHierarchy());
        Script s3 = new Script(getHierarchy());
        s1.addStep(s2);
        s2.addStep(s3);
        s3.addStep(new Script(getHierarchy()));
        assertTrue("Script 1 should be marked dirty", s1.isDirty());
        assertTrue("Script 2 should be marked dirty", s2.isDirty());
        assertTrue("Script 3 should be marked dirty", s3.isDirty());
        editor.saveNestedScripts(s1);
        assertTrue("Script 1 should have been saved", !s1.isDirty());
        assertTrue("Script 2 should have been saved", !s2.isDirty());
        assertTrue("Script 3 should have been saved", !s3.isDirty());
    }
View Full Code Here

        // 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());
    }
View Full Code Here

TOP

Related Classes of abbot.script.Script

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.