コード例 #1
0
  @Test
  public void handleModelReturnValue() throws Exception {
    mavContainer.addAttribute("attr1", "value1");
    Model returnValue = new ExtendedModelMap();
    returnValue.addAttribute("attr2", "value2");

    processor.handleReturnValue(returnValue, returnParamModel, mavContainer, webRequest);

    assertEquals("value1", mavContainer.getModel().get("attr1"));
    assertEquals("value2", mavContainer.getModel().get("attr2"));
  }
コード例 #2
0
 @Test
 public void supportsReturnType() {
   assertTrue(processor.supportsReturnType(returnParamModel));
 }
コード例 #3
0
 @Test
 public void resolveArgumentValue() throws Exception {
   assertSame(
       mavContainer.getModel(),
       processor.resolveArgument(paramModel, mavContainer, webRequest, null));
 }
コード例 #4
0
 @Test
 public void supportsParameter() {
   assertTrue(processor.supportsParameter(paramModel));
 }