Package org.springframework.web.bind.support

Examples of org.springframework.web.bind.support.SimpleSessionStatus


  @Test
  public void testPost() throws Exception {
    Account account = new Account("1", "Ben");
    account.setEntityId(new Long(0));
    BindingResult result = new BeanPropertyBindingResult(account, "account");
    SessionStatus sessionStatus = new SimpleSessionStatus();
    String view = controller.onSubmit(account , result, sessionStatus);
    assertEquals("redirect:/accounts/accountDetails.htm?entityId=0", view);
    assertTrue(sessionStatus.isComplete());
    account = accountManager.getAccount(Long.valueOf(0));
    assertEquals("1", account.getNumber());
    assertEquals("Ben", account.getName());
  }
View Full Code Here


  @Test
  public void testPost() throws Exception {
    Account account = new Account("1", "Ben");
    account.setEntityId(new Long(0));
    BindingResult result = new BeanPropertyBindingResult(account, "account");
    SessionStatus sessionStatus = new SimpleSessionStatus();
    // TODO 05: Invoke the controller onSubmit method, test the return val and status
    String view = null;
    assertEquals("redirect:/accounts/accountDetails.htm?entityId=0", view);
    assertTrue(sessionStatus.isComplete());
    account = accountManager.getAccount(Long.valueOf(0));
    assertEquals("1", account.getNumber());
    assertEquals("Ben", account.getName());
  }
View Full Code Here

TOP

Related Classes of org.springframework.web.bind.support.SimpleSessionStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.