Search in sources :

Example 1 with EmailController

use of ca.corefacility.bioinformatics.irida.service.EmailController in project irida by phac-nml.

the class PasswordResetControllerTest method setUp.

@Before
public void setUp() {
    userService = mock(UserService.class);
    passwordResetService = mock(PasswordResetService.class);
    emailController = mock(EmailController.class);
    messageSource = mock(MessageSource.class);
    controller = new PasswordResetController(userService, passwordResetService, emailController, messageSource);
}
Also used : PasswordResetService(ca.corefacility.bioinformatics.irida.service.user.PasswordResetService) UserService(ca.corefacility.bioinformatics.irida.service.user.UserService) PasswordResetController(ca.corefacility.bioinformatics.irida.ria.web.PasswordResetController) EmailController(ca.corefacility.bioinformatics.irida.service.EmailController) MessageSource(org.springframework.context.MessageSource) Before(org.junit.Before)

Example 2 with EmailController

use of ca.corefacility.bioinformatics.irida.service.EmailController in project irida by phac-nml.

the class UsersControllerTest method setUp.

@Before
public void setUp() {
    userService = mock(UserService.class);
    projectService = mock(ProjectService.class);
    messageSource = mock(MessageSource.class);
    emailController = mock(EmailController.class);
    passwordResetService = mock(PasswordResetService.class);
    controller = new UsersController(userService, projectService, passwordResetService, emailController, messageSource);
    User u1 = new User(1L, "tom", "tom@nowhere.com", "123456798", "Tom", "Matthews", "1234");
    u1.setModifiedDate(new Date());
    User u2 = new User(2L, "jeff", "jeff@somewhere.com", "ABCDEFGHIJ", "Jeff", "Guy", "5678");
    u2.setModifiedDate(new Date());
    userPage = new PageImpl<>(Lists.newArrayList(u1, u2));
}
Also used : PasswordResetService(ca.corefacility.bioinformatics.irida.service.user.PasswordResetService) UsersController(ca.corefacility.bioinformatics.irida.ria.web.UsersController) DTUser(ca.corefacility.bioinformatics.irida.ria.web.models.datatables.DTUser) User(ca.corefacility.bioinformatics.irida.model.user.User) UserService(ca.corefacility.bioinformatics.irida.service.user.UserService) EmailController(ca.corefacility.bioinformatics.irida.service.EmailController) ProjectService(ca.corefacility.bioinformatics.irida.service.ProjectService) MessageSource(org.springframework.context.MessageSource) Date(java.util.Date) Before(org.junit.Before)

Example 3 with EmailController

use of ca.corefacility.bioinformatics.irida.service.EmailController in project irida by phac-nml.

the class LoginControllerTest method setUp.

@Before
public void setUp() {
    this.emailController = mock(EmailController.class);
    controller = new LoginController(emailController);
}
Also used : LoginController(ca.corefacility.bioinformatics.irida.ria.web.LoginController) EmailController(ca.corefacility.bioinformatics.irida.service.EmailController) Before(org.junit.Before)

Aggregations

EmailController (ca.corefacility.bioinformatics.irida.service.EmailController)3 Before (org.junit.Before)3 PasswordResetService (ca.corefacility.bioinformatics.irida.service.user.PasswordResetService)2 UserService (ca.corefacility.bioinformatics.irida.service.user.UserService)2 MessageSource (org.springframework.context.MessageSource)2 User (ca.corefacility.bioinformatics.irida.model.user.User)1 LoginController (ca.corefacility.bioinformatics.irida.ria.web.LoginController)1 PasswordResetController (ca.corefacility.bioinformatics.irida.ria.web.PasswordResetController)1 UsersController (ca.corefacility.bioinformatics.irida.ria.web.UsersController)1 DTUser (ca.corefacility.bioinformatics.irida.ria.web.models.datatables.DTUser)1 ProjectService (ca.corefacility.bioinformatics.irida.service.ProjectService)1 Date (java.util.Date)1