Package org.apache.tapestry

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


        component.setup(null, _format, null, resources);

        writer.element("root");
        assertFalse(component.beginRender(writer));
        writer.end();

        verify();

        assertEquals(writer.toString(), "<root></root>");
    }
View Full Code Here


        component.setup(_value, format, elementName, resources);

        writer.element("root");
        assertFalse(component.beginRender(writer));
        writer.end();

        verify();

        assertEquals(writer.toString(), "<root></root>");
    }
View Full Code Here

        writer.element("select");

        select.options(writer);

        writer.end();

        assertEquals(writer.toString(), read("just_options.html"));
    }

    @Test
View Full Code Here

        writer.element("select");

        select.options(writer);

        writer.end();

        assertEquals(writer.toString(), read("option_attributes.html"));
    }

    @Test
View Full Code Here

        writer.element("select");

        select.options(writer);

        writer.end();

        assertEquals(writer.toString(), read("disabled_option.html"));

    }
View Full Code Here

        writer.element("select");

        select.options(writer);

        writer.end();

        assertEquals(writer.toString(), read("option_groups.html"));
    }

    @Test
View Full Code Here

        writer.element("select");

        select.options(writer);

        writer.end();

        assertEquals(writer.toString(), read("option_groups_precede_ungroup_options.html"));
    }

    @Test
View Full Code Here

        writer.element("select");

        select.options(writer);

        writer.end();

        assertEquals(writer.toString(), read("option_group_attributes.html"));
    }
}
View Full Code Here

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

        w.element("img", "src", "foo.png", "width", 20, "height", 20);
        w.end();

        // img is a tag with an end tag style of omit, so no close tag is written.

        assertEquals(w.toString(), "<img height=\"20\" src=\"foo.png\" width=\"20\">");
    }
View Full Code Here

    {
        MarkupWriter w = new MarkupWriterImpl();

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

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

    @Test
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.