Skip to content

Commit

Permalink
fixing expected exception when view throws exception
Browse files Browse the repository at this point in the history
  • Loading branch information
peas committed Sep 12, 2013
1 parent e14b94f commit 0c3654f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import br.com.caelum.vraptor4.core.MethodInfo;
import br.com.caelum.vraptor4.http.MutableRequest;
import br.com.caelum.vraptor4.http.MutableResponse;
import br.com.caelum.vraptor4.interceptor.ApplicationLogicException;
import br.com.caelum.vraptor4.proxy.JavassistProxifier;
import br.com.caelum.vraptor4.proxy.ObjenesisInstanceCreator;
import br.com.caelum.vraptor4.proxy.Proxifier;
Expand Down Expand Up @@ -136,7 +137,7 @@ public void shouldAllowCustomPathResolverWhileForwardingView() throws ServletExc
verify(dispatcher, only()).forward(request, response);
}

@Test(expected=ResultException.class)
@Test(expected=ApplicationLogicException.class)
public void shouldThrowResultExceptionIfServletExceptionOccursWhileForwardingView() throws Exception {
when(request.getRequestDispatcher(anyString())).thenReturn(dispatcher);
doThrow(new ServletException()).when(dispatcher).forward(request, response);
Expand Down

0 comments on commit 0c3654f

Please sign in to comment.