Examples of toHtml()


Examples of org.rendersnake.HtmlCanvas.toHtml()

public class Dump {
    public static void main(String[] args) throws IOException {
        HtmlCanvas html = new HtmlCanvas();
        html.render(HomePage.INSTANCE);
        System.out.println(html.toHtml());
    }
}
View Full Code Here

Examples of org.rendersnake.HtmlCanvas.toHtml()

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

Examples of org.rendersnake.HtmlCanvas.toHtml()

       
        Tidy tidy = new Tidy();
        tidy.setMessageListener(new TidyMessageCheck());
        tidy.setXHTML(true);
        tidy.setDocType("loose");
        tidy.parse(new ByteArrayInputStream(html.toHtml().getBytes()), System.out);       
    }
    public void testPageRenderWithError() throws IOException {
        HtmlCanvas html = new HtmlCanvas();
        html.tag("bogus");
        html.render(new PersonalPage());
View Full Code Here

Examples of org.rendersnake.HtmlCanvas.toHtml()

        Tidy tidy = new Tidy();
        tidy.setMessageListener(new TidyMessageCheck());
        tidy.setXHTML(true);
        tidy.setDocType("loose");
        try {
            tidy.parse(new ByteArrayInputStream(html.toHtml().getBytes()), System.out);       
        } catch (AssertionFailedError err) {
            System.out.println(err);
            // good thing
        }
    }
View Full Code Here

Examples of org.rendersnake.HtmlCanvas.toHtml()

    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());
        assertTrue(html.toHtml().indexOf("<div class=\"rendersnake-inspector\">") == 0);
    }
    public void testInpsectNull() throws IOException {
        try {
View Full Code Here

Examples of org.rendersnake.HtmlCanvas.toHtml()

        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());
        assertTrue(html.toHtml().indexOf("<div class=\"rendersnake-inspector\">") == 0);
    }
    public void testInpsectNull() throws IOException {
        try {
            new Inspector(null);
View Full Code Here

Examples of org.rendersnake.HtmlCanvas.toHtml()

        Inspector inspector = new Inspector(ui);
        HtmlCanvas html = new HtmlCanvas();
        html.render(inspector);
        assertNotNull("inspected html", html.toHtml());
        System.out.println(html.toHtml());
        assertTrue(html.toHtml().indexOf("<div class=\"rendersnake-inspector\">") == 0);
    }
    public void testInpsectNull() throws IOException {
        try {
            new Inspector(null);
            fail("new Inspector(null) must raise illegal argument exception");
View Full Code Here

Examples of org.rendersnake.HtmlCanvas.toHtml()

    public void testRender() throws Exception {
        HtmlCanvas html = new HtmlCanvas();
        resolver.setNextResolver(new MockCompponentResolver());
        html.render(resolver);
        assertFalse(html.toHtml().length() == 0);
    }

    public void testNext() {
        resolver.setNextResolver(new MockCompponentResolver());
        MockHttpRequest request = new MockHttpRequest();
View Full Code Here

Examples of org.rendersnake.HtmlCanvas.toHtml()

public class CrossSiteScriptingTest extends TestCase {
    public void testContent() throws Exception {
        HtmlCanvas html = new HtmlCanvas();
        html.write("<&>");
        assertEquals("&lt;&amp;&gt;",html.toHtml());
    }
    public void testAttributeContent() throws Exception {
        HtmlAttributes attrs = new HtmlAttributes();
        attrs.content("<&>");
        assertEquals(" content=\"&lt;&amp;&gt;\"",attrs.toHtml());
View Full Code Here

Examples of org.rendersnake.HtmlCanvas.toHtml()

   
    public void testRender() throws Exception {
        HtmlCanvas html = new HtmlCanvas();
        ctx.renderForErrorOn(html);
        ctx.renderForInpectorOn(new Inspector(new PersonalPage()), html);
        assertFalse(html.toHtml().length() == 0);
    }
}
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.