* @throws Exception
*/
@Test
public void panelWithAutoComponent() throws Exception
{
Page page = new MyPage();
Panel panel = new MyPanelWithAutoComponent("panel");
page.add(panel);
// Get the associated markup file
IMarkupFragment markup = panel.getAssociatedMarkup();
compareMarkupWithFile(markup, "MyPanelWithAutoComponent_ExpectedResult.html");
// The Page is missing the tag to "call" the panel
assertNull(panel.getMarkup());
// Create a Page with proper markup for the panel
page = new MyPanelWithAutoComponentPage();
panel = (Panel)page.get("panel");
// getMarkup() returns the "calling" tags
markup = panel.getMarkup();
compareMarkupWithString(markup, "<span wicket:id=\"panel\">test</span>");