* @throws Exception
*/
public void testBorder2() throws Exception
{
Page page = new MyBorderPage();
Border border = (Border)page.get("border2");
// Get the associated markup file
IMarkupFragment markup = border.getAssociatedMarkup();
compareWithFile(markup, "MyBorder2_ExpectedResult.html");
// getMarkup() returns the "calling" tags
markup = border.getMarkup();
compare(markup, "<span wicket:id=\"border2\">test</span>");
// getMarkup(null) returns the markup which is used to find a child component
markup = border.getMarkup(null);
compare(markup, "<wicket:border> 111 <wicket:body>333</wicket:body> 222</wicket:border>");
assertNull(border.getBodyContainer().getAssociatedMarkup());
// See explanation in BaseBorder.BorderBodyContainer.getMarkup()
markup = border.getBodyContainer().getParent().getMarkup(border.getBodyContainer());
compare(markup, "<wicket:body>333</wicket:body>");
markup = border.getBodyContainer().getMarkup();
compare(markup, "<wicket:body>333</wicket:body>");
markup = border.getBodyContainer().getMarkup(null);
compare(markup, "<span wicket:id=\"border2\">test</span>");
// getMarkup(null) returns the markup which is used to find a child component
markup = border.getBodyContainer().getMarkup(null);
compare(markup, "<span wicket:id=\"border2\">test</span>");
}