Package org.rendersnake.test.components

Examples of org.rendersnake.test.components.PersonUI


import org.w3c.tidy.Tidy;

public class PersonUITest extends TestCase {

    public void testRender() throws IOException {
        PersonUI ui = new PersonUI(new Person());
        HtmlCanvas html = new HtmlCanvas();
        ui.renderOn(html);
        System.out.println(html.toHtml());
    }
View Full Code Here


import org.rendersnake.tools.Inspector;

public class InspectorTest extends TestCase {

    public void testInpsectPersonUI() throws IOException {
        PersonUI ui = new PersonUI(new Person());
        Inspector inspector = new Inspector(ui);
        HtmlCanvas html = new HtmlCanvas();
        html.render(inspector);
        assertNotNull("inspected html", html.toHtml());
        System.out.println(html.toHtml());
View Full Code Here

    public void testTemplateWithRenderable() throws IOException {
        HtmlCanvas html = new HtmlCanvas();
       
        html.getPageContext().set("timestamp", new Date().toString());
       
        PersonUI ui = new PersonUI(new Person());
        html.getPageContext().set("person", new RenderableAttribute(html,ui));
       
        html.render(StringTemplate.get("templates/wrapper.html"));
        System.out.println(html.toHtml());
    }        
View Full Code Here

    public void renderOn(HtmlCanvas html) throws IOException {
        html
            .render(DocType.HTML_4_01_Strict)
            .html()
            .body()
                .render(new PersonUI(new Person()))
            ._body()
            ._html();
    }
View Full Code Here

TOP

Related Classes of org.rendersnake.test.components.PersonUI

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.