use of org.apache.wicket.request.IRequestHandler in project wicket by apache.
the class PageInstanceMapperTest method decode5.
/**
*/
@Test
public void decode5() {
Url url = Url.parse("wicket/page?abc");
IRequestHandler handler = encoder.mapRequest(getRequest(url));
assertNull(handler);
}
use of org.apache.wicket.request.IRequestHandler in project wicket by apache.
the class PageInstanceMapperTest method decode10.
@Test
public void decode10() {
final Url url = Url.parse("page?4");
Request request = new Request() {
@Override
public Url getUrl() {
return url;
}
@Override
public Locale getLocale() {
return null;
}
@Override
public Charset getCharset() {
return Charset.forName("UTF-8");
}
@Override
public Url getClientUrl() {
return Url.parse("page");
}
@Override
public Object getContainerRequest() {
return null;
}
};
IRequestHandler handler = encoder.mapRequest(request);
IRequestablePage page = ((IPageRequestHandler) handler).getPage();
checkPage(page, 4);
}
use of org.apache.wicket.request.IRequestHandler in project wicket by apache.
the class PageInstanceMapperTest method decode9.
@Test
public void decode9() {
final Url url = Url.parse("page?4");
Request request = new Request() {
@Override
public Url getUrl() {
return url;
}
@Override
public Locale getLocale() {
return null;
}
@Override
public Charset getCharset() {
return Charset.forName("UTF-8");
}
@Override
public Url getClientUrl() {
return Url.parse("wicket/page");
}
@Override
public Object getContainerRequest() {
return null;
}
};
IRequestHandler handler = encoder.mapRequest(request);
IRequestablePage page = ((IPageRequestHandler) handler).getPage();
checkPage(page, 4);
}
use of org.apache.wicket.request.IRequestHandler in project wicket by apache.
the class PageInstanceMapperTest method encode1.
/**
*/
@Test
public void encode1() {
MockPage page = new MockPage(15);
IPageProvider provider = new PageProvider(page);
IRequestHandler handler = new RenderPageRequestHandler(provider);
Url url = encoder.mapHandler(handler);
assertEquals("wicket/page?15", url.toString());
}
use of org.apache.wicket.request.IRequestHandler in project wicket by apache.
the class PageInstanceMapperTest method decode4.
/**
*/
@Test
public void decode4() {
Url url = Url.parse("wickett/pagee?4--a:b-c");
IRequestHandler handler = encoder.mapRequest(getRequest(url));
assertNull(handler);
}
Aggregations