Package com.commafeed.frontend.model.request

Examples of com.commafeed.frontend.model.request.RegistrationRequest


  @Test public void
  register_should_register_and_then_login() {
    // Create UserService mock
    UserService service = mock(UserService.class);
   
    RegistrationRequest req = new RegistrationRequest();
    req.setName("user");
    req.setPassword("password");
    req.setEmail("test@test.com");
   
    InOrder inOrder = inOrder(service);
   
    SessionHelper sessionHelper = mock(SessionHelper.class);
    UserREST userREST = new UserREST(null, null, null, service, null, null, null);
View Full Code Here


    // Create UserService mock
    UserService service = mock(UserService.class);
    when(service.register(any(String.class), any(String.class), any(String.class), Matchers.anyListOf(Role.class))).thenReturn(user);
    when(service.login(any(String.class), any(String.class))).thenReturn(Optional.of(user));
   
    RegistrationRequest req = new RegistrationRequest();
    req.setName("user");
    req.setPassword("password");
    req.setEmail("test@test.com");
   
    SessionHelper sessionHelper = mock(SessionHelper.class);
    UserREST userREST = new UserREST(null, null, null, service, null, null, null);
   
    userREST.register(req, sessionHelper);
View Full Code Here

TOP

Related Classes of com.commafeed.frontend.model.request.RegistrationRequest

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.