Package net.sourceforge.marathon.action

Examples of net.sourceforge.marathon.action.AssertText


    // /////////// test for HTML content ///////////////////////
    @Test
    public void testGetSetHTML() {
        MComponentMock mock = new MComponentMock(htmlEditor, "htmlSong");
        ComponentFinder resolver = mock.getResolver();
        ActionTestCase.assertPasses(new AssertText(null, getHTML(S1, false), ScriptModelServerPart.getModelServerPart(),
                WindowMonitor.getInstance()), resolver);
        htmlEditor.setText(getHTML(S2, false));
        ActionTestCase.assertPasses(new AssertText(null, getHTML(S2, false), ScriptModelServerPart.getModelServerPart(),
                WindowMonitor.getInstance()), resolver);
    }
View Full Code Here


    public void testSetTextToHTMLString() throws Exception {
        MComponentMock mock = new MComponentMock(htmlEditor, "htmlSong");
        ComponentFinder resolver = mock.getResolver();
        htmlEditor.setText("");
        ActionTestCase.assertPasses(
                new AssertText(null, "<html><head></head><body></body></html>", ScriptModelServerPart.getModelServerPart(),
                        WindowMonitor.getInstance()), resolver);
        htmlEditor.setText("hello");
        ActionTestCase.assertPasses(
                new AssertText(null, "<html><head></head><body>hello</body></html>", ScriptModelServerPart.getModelServerPart(),
                        WindowMonitor.getInstance()), resolver);
    }
View Full Code Here

    @Test
    public void testStringCompareInHTMLContext() throws Exception {
        MComponentMock mock = new MComponentMock(htmlEditor, "htmlSong");
        ComponentFinder resolver = mock.getResolver();
        ActionTestCase.assertPasses(new AssertText(null, getHTML(S1, false), ScriptModelServerPart.getModelServerPart(),
                WindowMonitor.getInstance()), resolver);
        ActionTestCase.assertPasses(new AssertText(null, getHTML(S1, true), ScriptModelServerPart.getModelServerPart(),
                WindowMonitor.getInstance()), resolver);
        ActionTestCase.assertFails(new AssertText(null, getHTML(S2, true), ScriptModelServerPart.getModelServerPart(),
                WindowMonitor.getInstance()), resolver);
    }
View Full Code Here

        }
        play(new SelectAction(id, list, scriptModel, windowMonitor));
    }

    public void assertText(ComponentId id, String text) {
        play(new AssertText(id, text, scriptModel, windowMonitor));
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.marathon.action.AssertText

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.