Search in sources :

Example 1 with ProjectSettingsAssociatedProjectsController

use of ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectSettingsAssociatedProjectsController in project irida by phac-nml.

the class ProjectSettingsAssociatedProjectsControllerTest method setUp.

@Before
public void setUp() {
    projectService = mock(ProjectService.class);
    userService = mock(UserService.class);
    projectUtils = mock(ProjectControllerUtils.class);
    messageSource = mock(MessageSource.class);
    controller = new ProjectSettingsAssociatedProjectsController(projectService, projectUtils, userService, messageSource);
    // fake out the servlet response so that the URI builder will work.
    RequestAttributes ra = new ServletRequestAttributes(new MockHttpServletRequest());
    RequestContextHolder.setRequestAttributes(ra);
}
Also used : UserService(ca.corefacility.bioinformatics.irida.service.user.UserService) ProjectControllerUtils(ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectControllerUtils) MockHttpServletRequest(org.springframework.mock.web.MockHttpServletRequest) ServletRequestAttributes(org.springframework.web.context.request.ServletRequestAttributes) ProjectService(ca.corefacility.bioinformatics.irida.service.ProjectService) MessageSource(org.springframework.context.MessageSource) ProjectSettingsAssociatedProjectsController(ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectSettingsAssociatedProjectsController) RequestAttributes(org.springframework.web.context.request.RequestAttributes) ServletRequestAttributes(org.springframework.web.context.request.ServletRequestAttributes) Before(org.junit.Before)

Aggregations

ProjectControllerUtils (ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectControllerUtils)1 ProjectSettingsAssociatedProjectsController (ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectSettingsAssociatedProjectsController)1 ProjectService (ca.corefacility.bioinformatics.irida.service.ProjectService)1 UserService (ca.corefacility.bioinformatics.irida.service.user.UserService)1 Before (org.junit.Before)1 MessageSource (org.springframework.context.MessageSource)1 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)1 RequestAttributes (org.springframework.web.context.request.RequestAttributes)1 ServletRequestAttributes (org.springframework.web.context.request.ServletRequestAttributes)1