Guest User

Untitled

a guest
Oct 18th, 2017
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. @Test
  2. public void submitAndCreateAccount() throws Exception {
  3.  
  4. EasyMock.expect(mockAccountService.createAccount(userEditing))
  5. .andReturn(UserOM.newUser());
  6.  
  7. EnhancedFormTester formTester = tester.newFormTester("accountForm");
  8.  
  9. formTester.setValue("username", "Tony Stark");
  10. formTester.setValue("email", "tonystark@stark.com");
  11. formTester.setValue("rawPassword", "pwd123");
  12. formTester.setValue("confirmRawPassword", "pwd123");
  13. control.replay();
  14.  
  15. formTester.submit();
  16. control.verify();
  17. tester.assertRenderedPage(FinishCreateAccountPage.class);
  18. }
Add Comment
Please, Sign In to add comment