use of org.apache.tapestry5.ioc.internal.OperationException in project tapestry-5 by apache.
the class DefaultRequestExceptionHandlerTest method handleRequestExceptionWithConfiguredPage.
@Test
public void handleRequestExceptionWithConfiguredPage() throws IOException {
train_resolvePageClassNameToPageName(componentClassResolver, MyPage.class.getName(), "mypage");
Link link = mockLink();
expect(linkSource.createPageRenderLink("mypage", false, new Object[] { "accesscontrol" })).andReturn(link);
expect(request.isXHR()).andReturn(false);
response.sendRedirect(link);
EasyMock.expectLastCall();
replay();
// also test unwrapping TapestryExceptions
exceptionHandler.handleRequestException(new OperationException(new RenderQueueException("renderqueue", new Object[0], new TapestryException("tapestryexception", new AccessControlException("No permission"))), new String[0]));
}
Aggregations