示例#1
0
 @Test
 public void emptyViewControllerHandlerMapping() {
   AbstractHandlerMapping handlerMapping =
       (AbstractHandlerMapping) mvcConfiguration.viewControllerHandlerMapping();
   assertNotNull(handlerMapping);
   assertEquals(Integer.MAX_VALUE, handlerMapping.getOrder());
   assertTrue(handlerMapping.getClass().getName().endsWith("EmptyHandlerMapping"));
 }
示例#2
0
 @Test
 public void emptyDefaultServletHandlerMapping() {
   mvcConfiguration.setServletContext(new MockServletContext());
   AbstractHandlerMapping handlerMapping =
       (AbstractHandlerMapping) mvcConfiguration.defaultServletHandlerMapping();
   assertNotNull(handlerMapping);
   assertEquals(Integer.MAX_VALUE, handlerMapping.getOrder());
   assertTrue(handlerMapping.getClass().getName().endsWith("EmptyHandlerMapping"));
 }
示例#3
0
 @Test
 public void emptyResourceHandlerMapping() {
   mvcConfiguration.setApplicationContext(new StaticWebApplicationContext());
   AbstractHandlerMapping handlerMapping =
       (AbstractHandlerMapping) mvcConfiguration.resourceHandlerMapping();
   assertNotNull(handlerMapping);
   assertEquals(Integer.MAX_VALUE, handlerMapping.getOrder());
   assertTrue(handlerMapping.getClass().getName().endsWith("EmptyHandlerMapping"));
 }