Package org.apache.tapestry5

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


    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

    {
        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

    @Test(expectedExceptions = IllegalStateException.class)
    public void comment_with_no_current_element()
    {
        MarkupWriter w = new MarkupWriterImpl();

        w.comment("fail!");
    }

    @Test(expectedExceptions = IllegalStateException.class)
    public void attribute_ns_with_no_current_element()
    {
View Full Code Here

    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

    {
        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

    @Test(expectedExceptions = IllegalStateException.class)
    public void comment_with_no_current_element()
    {
        MarkupWriter w = new MarkupWriterImpl();

        w.comment("fail!");
    }

    @Test(expectedExceptions = IllegalStateException.class)
    public void attribute_ns_with_no_current_element()
    {
View Full Code Here

    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

    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

    {
        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

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.