This commit is contained in:
tipsy
2015-04-24 20:26:08 +02:00
parent 77c5fa2026
commit eafaf6fa1f
3 changed files with 16 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
package j2html.test.attributes;
import j2html.src.attributes.Attribute;
import j2html.src.tags.ContainerTag;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
@@ -19,4 +20,12 @@ public class AttributeTest {
assertTrue(nullAttribute.render().equals(""));
}
@Test
public void testSetAttribute() throws Exception {
ContainerTag testTag = new ContainerTag("a");
testTag.setAttribute("href", "http://example.com");
testTag.setAttribute("href", "http://example.org");
assertTrue(testTag.render().equals("<a href=\"http://example.org\"></a>"));
}
}