@ -136,7 +136,7 @@ public class DispatcherPortletTests extends TestCase {
@@ -136,7 +136,7 @@ public class DispatcherPortletTests extends TestCase {
simpleDispatcherPortlet . processAction ( request , response ) ;
String exceptionParam = response . getRenderParameter ( DispatcherPortlet . ACTION_EXCEPTION_RENDER_PARAMETER ) ;
assertNotNull ( exceptionParam ) ;
assertTrue ( exceptionParam . startsWith ( Unavailable Exception. class . getName ( ) ) ) ;
assertTrue ( exceptionParam . startsWith ( NoHandlerFound Exception. class . getName ( ) ) ) ;
}
public void testSimpleFormViewNoBindOnNewForm ( ) throws Exception {
@ -246,7 +246,7 @@ public class DispatcherPortletTests extends TestCase {
@@ -246,7 +246,7 @@ public class DispatcherPortletTests extends TestCase {
simpleDispatcherPortlet . doDispatch ( request , response ) ;
fail ( "Should have thrown UnavailableException" ) ;
}
catch ( Unavailable Exception ex ) {
catch ( NoHandlerFound Exception ex ) {
// expected
}
}
@ -279,7 +279,7 @@ public class DispatcherPortletTests extends TestCase {
@@ -279,7 +279,7 @@ public class DispatcherPortletTests extends TestCase {
complexDispatcherPortlet . processAction ( request , response ) ;
String exceptionParam = response . getRenderParameter ( DispatcherPortlet . ACTION_EXCEPTION_RENDER_PARAMETER ) ;
assertNotNull ( exceptionParam ) ;
assertTrue ( exceptionParam . startsWith ( Unavailable Exception. class . getName ( ) ) ) ;
assertTrue ( exceptionParam . startsWith ( NoHandlerFound Exception. class . getName ( ) ) ) ;
}
public void testPortletModeParameterMappingInvalidHelpRenderRequest ( ) throws Exception {
@ -289,7 +289,7 @@ public class DispatcherPortletTests extends TestCase {
@@ -289,7 +289,7 @@ public class DispatcherPortletTests extends TestCase {
request . setParameter ( "action" , "help3" ) ;
complexDispatcherPortlet . doDispatch ( request , response ) ;
Map model = ( Map ) request . getAttribute ( ViewRendererServlet . MODEL_ATTRIBUTE ) ;
assertTrue ( model . get ( "exception" ) . getClass ( ) . equals ( Unavailable Exception. class ) ) ;
assertTrue ( model . get ( "exception" ) . getClass ( ) . equals ( NoHandlerFound Exception. class ) ) ;
InternalResourceView view = ( InternalResourceView ) request . getAttribute ( ViewRendererServlet . VIEW_ATTRIBUTE ) ;
assertEquals ( "failed-unavailable" , view . getBeanName ( ) ) ;
}
@ -405,7 +405,7 @@ public class DispatcherPortletTests extends TestCase {
@@ -405,7 +405,7 @@ public class DispatcherPortletTests extends TestCase {
complexDispatcherPortlet . processAction ( request , response ) ;
String exceptionParam = response . getRenderParameter ( DispatcherPortlet . ACTION_EXCEPTION_RENDER_PARAMETER ) ;
assertNotNull ( exceptionParam ) ;
assertTrue ( exceptionParam . startsWith ( Unavailable Exception. class . getName ( ) ) ) ;
assertTrue ( exceptionParam . startsWith ( NoHandlerFound Exception. class . getName ( ) ) ) ;
}
public void testNoDetectAllHandlerMappingsWithParameterRenderRequest ( ) throws Exception {
@ -420,7 +420,7 @@ public class DispatcherPortletTests extends TestCase {
@@ -420,7 +420,7 @@ public class DispatcherPortletTests extends TestCase {
complexDispatcherPortlet . doDispatch ( request , response ) ;
Map model = ( Map ) request . getAttribute ( ViewRendererServlet . MODEL_ATTRIBUTE ) ;
Exception exception = ( Exception ) model . get ( "exception" ) ;
assertTrue ( exception . getClass ( ) . equals ( Unavailable Exception. class ) ) ;
assertTrue ( exception . getClass ( ) . equals ( NoHandlerFound Exception. class ) ) ;
InternalResourceView view = ( InternalResourceView ) request . getAttribute ( ViewRendererServlet . VIEW_ATTRIBUTE ) ;
assertEquals ( "failed-unavailable" , view . getBeanName ( ) ) ;
}
@ -900,9 +900,9 @@ public class DispatcherPortletTests extends TestCase {
@@ -900,9 +900,9 @@ public class DispatcherPortletTests extends TestCase {
try {
simpleDispatcherPortlet . doDispatch ( request , response ) ;
fail ( "should have failed to find a handler and raised an Unavailable Exception" ) ;
fail ( "should have failed to find a handler and raised an NoHandlerFoundException Exception" ) ;
}
catch ( Unavailable Exception ex ) {
catch ( NoHandlerFound Exception ex ) {
// expected
}