Search in sources :

Example 1 with OuterBorder

use of org.apache.wicket.queueing.nestedborders.OuterBorder in project wicket by apache.

the class ComponentQueueingTest method border_nested.

@Test
public void border_nested() {
    MarkupContainer a = new A(), b = new B(), c = new C(), d = new D(), r = new R(), s = new S();
    Border outerBorder = new OuterBorder("outerBorder");
    Border innerBorder = new InnerBorder("innerBorder");
    outerBorder.queueToBorder(r, innerBorder);
    innerBorder.queueToBorder(c, d);
    outerBorder.queueToBorder(s);
    TestPage p = new TestPage();
    p.setPageMarkup("<p wicket:id='a'><p wicket:id='outerBorder'><p wicket:id='b'></p></p></p>");
    p.queue(b, outerBorder, a);
    tester.startPage(p);
    assertThat(p, hasPath(new Path(a, outerBorder, r, innerBorder, c, d, innerBorder.getBodyContainer(), s)));
    assertThat(p, hasPath(new Path(a, outerBorder, r, outerBorder.getBodyContainer(), b)));
}
Also used : WicketMatchers.hasPath(org.apache.wicket.queueing.WicketMatchers.hasPath) MarkupContainer(org.apache.wicket.MarkupContainer) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) TransparentWebMarkupContainer(org.apache.wicket.markup.html.TransparentWebMarkupContainer) OuterBorder(org.apache.wicket.queueing.nestedborders.OuterBorder) InnerBorder(org.apache.wicket.queueing.nestedborders.InnerBorder) OuterBorder(org.apache.wicket.queueing.nestedborders.OuterBorder) Border(org.apache.wicket.markup.html.border.Border) InnerBorder(org.apache.wicket.queueing.nestedborders.InnerBorder) Test(org.junit.Test)

Aggregations

MarkupContainer (org.apache.wicket.MarkupContainer)1 TransparentWebMarkupContainer (org.apache.wicket.markup.html.TransparentWebMarkupContainer)1 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)1 Border (org.apache.wicket.markup.html.border.Border)1 WicketMatchers.hasPath (org.apache.wicket.queueing.WicketMatchers.hasPath)1 InnerBorder (org.apache.wicket.queueing.nestedborders.InnerBorder)1 OuterBorder (org.apache.wicket.queueing.nestedborders.OuterBorder)1 Test (org.junit.Test)1