Examples of StdOutConsole


Examples of net.sourceforge.marathon.junit.StdOutConsole

    }

    @Test public void testSuccessfulPlay() throws Exception {
        editor.setText("#{{{ Marathon\ndef test():\nthis is the tape");
        editor.setData("filename", "dummy");
        display.play(new StdOutConsole());
        AWTSync.sync();
        verify(runtimeFactoryStub);
        assertEquals("#{{{ Marathon\ndef test():\nthis is the tape\n" + Indent.getIndent() + "pass\n",
                runtimeStub.lastContent);
        assertEquals("dummy", runtimeStub.lastFilename);
View Full Code Here

Examples of net.sourceforge.marathon.junit.StdOutConsole

    @Test public void testPlayWithException() throws Exception {
        runtimeStub.scriptsFail = true ;
        editor.setText("#{{{ Marathon\ndef test():\n");
        editor.setData("filename", "dummy");
        synchronized (this) {
            display.play(new StdOutConsole());
        }
        assertState(State.STOPPED_WITH_APP_OPEN);
    }
View Full Code Here

Examples of net.sourceforge.marathon.junit.StdOutConsole

    }

    @Test public void testRecord() {
        editor.setText("");
        editor.setData("filename", "dummy");
        display.record(new StdOutConsole());
        assertState(State.RECORDING);
        assertTrue(runtimeStub.isRecording);
        assertEquals("", editor.getText());
        editor.insertScript("foobar");
        assertEquals("foobar", editor.getText());
View Full Code Here

Examples of net.sourceforge.marathon.junit.StdOutConsole

    }

    @Test public void testPauseResume() {
        editor.setText("");
        editor.setData("filename", "dummy");
        display.record(new StdOutConsole());
        assertState(State.RECORDING);
        assertTrue(runtimeStub.isRecording);
        assertEquals("", editor.getText());
        editor.insertScript("foobar");
        assertEquals("foobar", editor.getText());
View Full Code Here

Examples of net.sourceforge.marathon.junit.StdOutConsole

    }

    @Test public void testScriptMunging() throws Exception {
        editor.setText("#{{{ Marathon\ndef test():\n\n\n");
        editor.setData("filename", "dummy");
        display.play(new StdOutConsole());
        assertEquals("#{{{ Marathon\ndef test():\n\n\n\n" + Indent.getIndent() + "pass\n",
                runtimeStub.lastContent);
    }
View Full Code Here

Examples of net.sourceforge.marathon.junit.StdOutConsole

    @Test public void testNew() {
        String testHeader = "#{{{ Marathon\nfrom default import *\n#}}}\n\ndef test():\n";
        assertEquals(testHeader, editor.getText());
        editor.setCaretPosition(54);
        display.record(new StdOutConsole());
        assertState(State.RECORDING);
        editor.insertScript("bingo");
        display.stop();
        assertState(State.STOPPED_WITH_APP_CLOSED);
        assertEquals(testHeader + "bingo", editor.getText());
View Full Code Here

Examples of net.sourceforge.marathon.junit.StdOutConsole

    }

    @Test public void testTracingAfterPlay() throws InterruptedException {
        editor.setText("#{{{ Marathon\nfrom xx import *\n#}}}\ndef test():\n\n\n");
        editor.setData("filename", "dummy");
        display.play(new StdOutConsole());
        Thread.sleep(500);
        aboutToExecute("foo", "dummy", 5);
        assertEquals(5, editor.getCaretLine() + 1);
        display.showResult(new PlaybackResult());
        assertEquals(1, editor.getCaretLine() + 1);
View Full Code Here

Examples of net.sourceforge.marathon.junit.StdOutConsole

    }

    public void xtestOutputIsResetCorrectly() throws IOException, InterruptedException, InvocationTargetException {
        editor.setText("#{{{ Marathon\ndef test():\n");
        editor.setData("filename", "dummy");
        display.play(new StdOutConsole());
        agentOutput("fire 1");
        agentOutput("fire 2");

        SwingUtilities.invokeAndWait(new Runnable() {
            public void run() {
            }
        });
        display.showResult(new PlaybackResult());
        assertEquals("fire 1fire 2", view.getOutputPane().getText());
        display.play(new StdOutConsole());
        assertEquals("", view.getOutputPane().getText());
        agentOutput("fire 3");
        SwingUtilities.invokeAndWait(new Runnable() {
            public void run() {
            }
View Full Code Here

Examples of net.sourceforge.marathon.junit.StdOutConsole

    }

    @Test public void testExec() {
        editor.setText("");
        editor.setData("filename", "dummy");
        display.record(new StdOutConsole());
        assertState(State.RECORDING);
        assertTrue(runtimeStub.isRecording);
        assertEquals("", editor.getText());
        display.insertScript("foobar");
        AWTSync.sync();
View Full Code Here

Examples of net.sourceforge.marathon.junit.StdOutConsole

    }

    @Test public void testExecWithPackage() {
        editor.setText("");
        editor.setData("filename", "dummy");
        display.record(new StdOutConsole());
        assertState(State.RECORDING);
        assertTrue(runtimeStub.isRecording);
        assertEquals("", editor.getText());
        display.insertScript("foo.bar");
        AWTSync.sync();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.