Examples of comment()


Examples of org.apache.tapestry5.MarkupWriter.comment()

    public void comment()
    {
        MarkupWriter w = new MarkupWriterImpl();

        w.element("root");
        w.comment("A comment");
        w.end();

        assertEquals(w.toString(), "<root><!-- A comment --></root>");
    }
View Full Code Here

Examples of org.apache.tapestry5.MarkupWriter.comment()

    public void entities_inside_comment_not_converted()
    {
        MarkupWriter w = new MarkupWriterImpl();

        w.element("root");
        w.comment("<&>");
        w.end();

        assertEquals(w.toString(), "<root><!-- <&> --></root>");

    }
View Full Code Here

Examples of org.apache.tapestry5.MarkupWriter.comment()

    {
        MarkupWriter w = new MarkupWriterImpl();

        w.element("root");
        w.write("before");
        w.comment("A comment");
        w.write("after");
        w.end();

        assertEquals(w.toString(), "<root>before<!-- A comment -->after</root>");
    }
View Full Code Here

Examples of org.apache.tapestry5.MarkupWriter.comment()

    public void comment()
    {
        MarkupWriter w = new MarkupWriterImpl();

        w.element("root");
        w.comment("A comment");
        w.end();

        assertEquals(w.toString(), "<root><!-- A comment --></root>");
    }
View Full Code Here

Examples of org.apache.tapestry5.MarkupWriter.comment()

    public void entities_inside_comment_not_converted()
    {
        MarkupWriter w = new MarkupWriterImpl();

        w.element("root");
        w.comment("<&>");
        w.end();

        assertEquals(w.toString(), "<root><!-- <&> --></root>");
    }
View Full Code Here

Examples of org.apache.tapestry5.MarkupWriter.comment()

    {
        MarkupWriter w = new MarkupWriterImpl();

        w.element("root");
        w.write("before");
        w.comment("A comment");
        w.write("after");
        w.end();

        assertEquals(w.toString(), "<root>before<!-- A comment -->after</root>");
    }
View Full Code Here

Examples of org.apache.tapestry5.MarkupWriter.comment()

    @Test()
    public void preamble_content() throws Exception
    {
        MarkupWriter w = new MarkupWriterImpl(new XMLMarkupModel());

        w.comment("preamble start");
        w.write("preamble text");
        w.cdata("CDATA content");
        w.writeRaw("&nbsp;");
        w.element("root");
        w.end();
View Full Code Here

Examples of org.apache.tapestry5.MarkupWriter.comment()

        w.writeRaw("&nbsp;");
        w.element("root");
        w.end();
        // You really shouldn't have any text after the close tag of the document, so it
        // gets moved to the top, to the "preamble", before the first element.
        w.comment("content after root element in preamble");

        assertEquals(w.getDocument().toString(), readFile("preamble_content.txt"));
    }

    @Test(expectedExceptions = IllegalStateException.class)
View Full Code Here

Examples of org.apache.tapestry5.MarkupWriter.comment()

    @Test
    public void preamble_content() throws Exception
    {
        MarkupWriter w = new MarkupWriterImpl(new XMLMarkupModel());

        w.comment(" preamble start ");
        w.write("preamble text");
        w.cdata("CDATA content");
        w.writeRaw("&nbsp;");
        w.element("root");
        w.end();
View Full Code Here

Examples of org.apache.tapestry5.MarkupWriter.comment()

        w.writeRaw("&nbsp;");
        w.element("root");
        w.end();
        // You really shouldn't have any text after the close tag of the document, so it
        // gets moved to the top, to the "preamble", before the first element.
        w.comment(" content after root element in preamble ");

        assertEquals(w.getDocument().toString(), readFile("preamble_content.txt"));
    }

    /** TAP5-1145 */
 
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.