Examples of DebugHtmlCanvas


Examples of org.rendersnake.tools.DebugHtmlCanvas

import junit.framework.TestCase;

public class DebugServletCanvasTest extends TestCase {

    public void testRenderCount() throws IOException {
        DebugHtmlCanvas html = new DebugHtmlCanvas(new MockHttpRequest(), new MockHttpResponse(), new StringWriter());
        html.render(new PersonalPage());
        assertEquals(3, html.renderCount);
    }
View Full Code Here

Examples of org.rendersnake.tools.DebugHtmlCanvas

        html.render(new PersonalPage());
        assertEquals(3, html.renderCount);
    }

    public void testRenderCountDisabled() throws IOException {
        DebugHtmlCanvas html = new DebugHtmlCanvas(new MockHttpRequest(), new MockHttpResponse(), new StringWriter());
        html.enabled = false;
        html.render(new PersonalPage());
        assertEquals(0, html.renderCount);
    }
View Full Code Here

Examples of org.rendersnake.tools.DebugHtmlCanvas

    public static HtmlCanvas createCanvas(HttpServletRequest request, HttpServletResponse response, Writer out) {

        HtmlCanvas html = null;
        // detect debug request
        if (DEBUG_ENABLED && (request.getParameter(INSPECT_QUERY_PARAM) != null)) {
            html = new DebugHtmlCanvas(request, response, out);
        } else {
            html = new HtmlServletCanvas(request, response, out);
        }
        return html;
    }
View Full Code Here

Examples of org.rendersnake.tools.DebugHtmlCanvas

    public void testRender() throws IOException {
        MockHttpRequest req = new MockHttpRequest();
        req.pathInfo = "site/examples.html";
       
        IndexPage index = new IndexPage();
        DebugHtmlCanvas html = new DebugHtmlCanvas(req,null,new PrettyWriter(new StringWriter()));
        html.enabled = false;
        html.render(index);
       
        System.out.println(html.toHtml());
    }
View Full Code Here

Examples of org.rendersnake.tools.DebugHtmlCanvas

    public void testRender() throws IOException {
       
        MockHttpRequest request = new MockHttpRequest();
        MockHttpResponse response = new MockHttpResponse();
       
        DebugHtmlCanvas html = new DebugHtmlCanvas(request,response,new PrettyWriter());
        html.enabled = false;
        html.render(new LoginForm());
       
        System.out.println(html.toHtml());
    }
View Full Code Here

Examples of org.rendersnake.tools.DebugHtmlCanvas

    public static HtmlCanvas createCanvas(HttpServletRequest request, HttpServletResponse response, Writer out) {

        HtmlCanvas html = null;
        // detect debug request
        if (DEBUG_ENABLED && (request.getParameter(INSPECT_QUERY_PARAM) != null)) {
            html = new DebugHtmlCanvas(request, response, out);
        } else {
            html = new HtmlServletCanvas(request, response, out);
        }
        return html;
    }
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.