Exemplo n.º 1
0
 @Test
 public void
     HandlerMethodインスタンスに付与されていないメソッドを対象SessionAttributeComplete注釈のvalue属性を取得した場合nullが返却される()
         throws Exception {
   HandlerMethod handler =
       new HandlerMethod(
           new ControllersTestController(), ControllersTestController.class.getMethod("test"));
   assertThat(Controllers.findClearSessionAttributeNames(handler.getMethod()), is(nullValue()));
 }
Exemplo n.º 2
0
 @Test
 public void HandlerMethodインスタンスに付与されているSessionAttributeComplete注釈のvalue属性を取得() throws Exception {
   HandlerMethod handler =
       new HandlerMethod(
           new ControllersTestController(),
           ControllersTestController.class.getMethod("sessionAttributeComplete"));
   assertThat(
       Arrays.asList(Controllers.findClearSessionAttributeNames(handler.getMethod())),
       hasItem("modelAttribute"));
 }