/**
* <p>Verify the presence and contents of a base element.</p>
*/
public void testBase() throws Exception {
HtmlBase base = null;
Iterator kids = head().getChildElements().iterator();
while (kids.hasNext()) {
HtmlElement kid = (HtmlElement) kids.next();
if (kid instanceof HtmlBase) {
assertNull("Only one base element present", base);
base = (HtmlBase) kid;
}
}
assertNotNull("Exactly one base element present", base);
assertEquals("base", base.getTagName());
assertEquals(url("/simple.jsp").toString(), base.getHrefAttribute());
assertEquals("", base.getTargetAttribute());
}