use of org.apache.wicket.core.request.handler.ListenerRequestHandler in project wicket by apache.
the class MountedMapperTest method decode12.
/**
*/
@Test
public void decode12() {
Url url = Url.parse("some/mount/path/i1/i2?-1.-foo-bar&a=b&b=c");
IRequestHandler handler = encoder.mapRequest(getRequest(url));
assertThat(handler, instanceOf(ListenerRequestHandler.class));
ListenerRequestHandler h = (ListenerRequestHandler) handler;
IRequestablePage page = h.getPage();
checkPage(page, 1);
assertEquals("foo:bar", h.getComponent().getPageRelativePath());
assertNull(h.getBehaviorIndex());
PageParameters p = page.getPageParameters();
assertEquals(2, p.getIndexedCount());
assertEquals(2, p.getNamedKeys().size());
}
use of org.apache.wicket.core.request.handler.ListenerRequestHandler in project wicket by apache.
the class PackageMapperTest method decode5.
/**
*/
@Test
public void decode5() {
Url url = Url.parse(MOUNT_PATH + '/' + PAGE_CLASS_NAME + "?15--foo-bar");
IRequestHandler handler = encoder.mapRequest(getRequest(url));
assertThat(handler, instanceOf(ListenerRequestHandler.class));
ListenerRequestHandler h = (ListenerRequestHandler) handler;
IRequestablePage page = h.getPage();
checkPage(page, 15);
assertEquals("foo:bar", h.getComponent().getPageRelativePath());
assertNull(h.getBehaviorIndex());
}
use of org.apache.wicket.core.request.handler.ListenerRequestHandler in project wicket by apache.
the class PackageMapperTest method decode7.
/**
*/
@Test
public void decode7() {
Url url = Url.parse(MOUNT_PATH + '/' + PAGE_CLASS_NAME + "?15-.4-foo-bar");
IRequestHandler handler = encoder.mapRequest(getRequest(url));
assertThat(handler, instanceOf(ListenerRequestHandler.class));
ListenerRequestHandler h = (ListenerRequestHandler) handler;
IRequestablePage page = h.getPage();
checkPage(page, 15);
assertEquals("foo:bar", h.getComponent().getPageRelativePath());
assertEquals((Object) 4, h.getBehaviorIndex());
}
use of org.apache.wicket.core.request.handler.ListenerRequestHandler in project wicket by apache.
the class PageInstanceMapperTest method decode3.
/**
*/
@Test
public void decode3() {
Url url = Url.parse("wicket/page?4--a-b-c");
IRequestHandler handler = encoder.mapRequest(getRequest(url));
assertThat(handler, instanceOf(ListenerRequestHandler.class));
ListenerRequestHandler h = (ListenerRequestHandler) handler;
checkPage(h.getPage(), 4);
assertEquals(h.getComponent().getPageRelativePath(), "a:b:c");
assertNull(h.getBehaviorIndex());
}
use of org.apache.wicket.core.request.handler.ListenerRequestHandler in project wicket by apache.
the class PageInstanceMapperTest method decode7.
/**
*/
@Test
public void decode7() {
Url url = Url.parse("wicket/page?4-6.5-a-b-c");
context.setNextPageRenderCount(6);
IRequestHandler handler = encoder.mapRequest(getRequest(url));
assertThat(handler, instanceOf(ListenerRequestHandler.class));
ListenerRequestHandler h = (ListenerRequestHandler) handler;
assertEquals(6, h.getPage().getRenderCount());
}
Aggregations