@Test public void testWithSupplementaryCharacterInAttributeKeyAndValue() { String s = new String(Character.toChars(135361)); Attribute attr = new Attribute(s, "A" + s + "B"); assertEquals(s + "=\"A" + s + "B\"", attr.html()); assertEquals(attr.html(), attr.toString()); }
@Test public void html() { Attribute attr = new Attribute("key", "value &"); assertEquals("key=\"value &\"", attr.html()); assertEquals(attr.html(), attr.toString()); }