Package org.rendersnake

Examples of org.rendersnake.HtmlAttributes.toHtml()


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


    }

    public void testEntities() {
        HtmlAttributes a = new HtmlAttributes();
        a.value("\"'<>&");
        Assert.assertEquals(" value=\"&quot;&#39;&lt;&gt;&amp;\"", a.toHtml());
    }
   
    public void testConstructor() {
        HtmlAttributes one = new HtmlAttributes();
        one.id("id");
View Full Code Here

        HtmlAttributes one = new HtmlAttributes();
        one.id("id");
        HtmlAttributes withClass = new HtmlAttributes(one);
        withClass.class_("class");
        Assert.assertEquals(" id=\"id\"", one.toHtml());
        Assert.assertEquals(" id=\"id\" class=\"class\"", withClass.toHtml());
    }
   
    public void testtestdata() throws IOException {
        attrs.dataTest("yes");
        Assert.assertEquals(" data-test=\"yes\"", attrs.toHtml());
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.