Package org.apache.tapestry

Examples of org.apache.tapestry.IMarkupWriter.end()


        mw.begin("span");
        mw.begin("b");

        try
        {
            mw.end("table");
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertEquals(
View Full Code Here


        IMarkupWriter mw = new MarkupWriterImpl("text/html", writer, filter);

        try
        {
            mw.end();
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertEquals(
View Full Code Here

        IMarkupWriter mw = new MarkupWriterImpl("text/html", writer, filter);

        mw.begin("div");
        mw.attribute("width", "100%");
        mw.end();

        assertOutput("<div width=\"{100%}\"></div>");
    }

    public void testPrint()
View Full Code Here

        IMarkupWriter mw = new MarkupWriterImpl("text/html", writer, filter);

        mw.begin("div");
        mw.print("Hello");
        mw.end();

        assertOutput("<div>{Hello}</div>");
    }

    public void testPrintNull()
View Full Code Here

        IMarkupWriter mw = new MarkupWriterImpl("text/html", writer, filter);

        mw.begin("span");
        mw.print(null);
        mw.end();

        assertOutput("<span></span>");

        verifyControls();
    }
View Full Code Here

        mw.begin("span");
        mw.closeTag();

        assertOutput("<h1><b><img/><span>");

        mw.end();

        assertOutput("</span>");

        mw.end();
View Full Code Here

        mw.end();

        assertOutput("</span>");

        mw.end();

        // Note: skipping the empty <img> tag

        assertOutput("</b>");
View Full Code Here

        // Note: skipping the empty <img> tag

        assertOutput("</b>");

        mw.end();

        assertOutput("</h1>");

        verifyControls();
    }
View Full Code Here

        writer.begin("span");
        writer.attribute("class", "paisley");
        writer.attribute("informal", "informal-value");
        writer.print("42");
        writer.end();

        replayControls();

        Insert insert = (Insert) newInstance(Insert.class, new Object[]
        { "value", "42", "specification", spec, "styleClass", "paisley" });
View Full Code Here

        // using EasyMock, that methods are invoked in the correct
        // order. But sometimes you have to trust the code (
        // and trust that future developers won't break something
        // that obvious!).

        writer.end("div");

        replayControls();

        Conditional conditional = (Conditional) newInstance(Conditional.class, new Object[]
        { "condition", Boolean.TRUE, "element", "div", "specification", spec });
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.