Search in sources :

Example 1 with ProjectService

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

the class ProjectUsersControllerTest method setUp.

@Before
public void setUp() {
    projectService = mock(ProjectService.class);
    userService = mock(UserService.class);
    controller = new RESTProjectUsersController(userService, projectService);
}
Also used : UserService(ca.corefacility.bioinformatics.irida.service.user.UserService) ProjectService(ca.corefacility.bioinformatics.irida.service.ProjectService) RESTProjectUsersController(ca.corefacility.bioinformatics.irida.web.controller.api.projects.RESTProjectUsersController) Before(org.junit.Before)

Example 2 with ProjectService

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

the class PipelineControllerTest method setUp.

@Before
public void setUp() {
    referenceFileService = mock(ReferenceFileService.class);
    analysisSubmissionService = mock(AnalysisSubmissionService.class);
    workflowsService = mock(IridaWorkflowsService.class);
    projectService = mock(ProjectService.class);
    userService = mock(UserService.class);
    messageSource = mock(MessageSource.class);
    cartController = mock(CartController.class);
    sequencingObjectService = mock(SequencingObjectService.class);
    namedParameterService = mock(WorkflowNamedParametersService.class);
    updateSamplePermission = mock(UpdateSamplePermission.class);
    analysisSubmissionSampleProcessor = mock(AnalysisSubmissionSampleProcessor.class);
    galaxyToolDataService = mock(GalaxyToolDataService.class);
    controller = new PipelineController(sequencingObjectService, referenceFileService, analysisSubmissionService, workflowsService, projectService, userService, cartController, messageSource, namedParameterService, updateSamplePermission, analysisSubmissionSampleProcessor, galaxyToolDataService);
    when(messageSource.getMessage(any(), any(), any())).thenReturn("");
}
Also used : CartController(ca.corefacility.bioinformatics.irida.ria.web.analysis.CartController) SequencingObjectService(ca.corefacility.bioinformatics.irida.service.SequencingObjectService) GalaxyToolDataService(ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyToolDataService) UserService(ca.corefacility.bioinformatics.irida.service.user.UserService) AnalysisSubmissionService(ca.corefacility.bioinformatics.irida.service.AnalysisSubmissionService) IridaWorkflowsService(ca.corefacility.bioinformatics.irida.service.workflow.IridaWorkflowsService) ProjectService(ca.corefacility.bioinformatics.irida.service.ProjectService) MessageSource(org.springframework.context.MessageSource) ReferenceFileService(ca.corefacility.bioinformatics.irida.service.ReferenceFileService) PipelineController(ca.corefacility.bioinformatics.irida.ria.web.pipelines.PipelineController) UpdateSamplePermission(ca.corefacility.bioinformatics.irida.security.permissions.sample.UpdateSamplePermission) WorkflowNamedParametersService(ca.corefacility.bioinformatics.irida.service.workflow.WorkflowNamedParametersService) AnalysisSubmissionSampleProcessor(ca.corefacility.bioinformatics.irida.pipeline.results.AnalysisSubmissionSampleProcessor) Before(org.junit.Before)

Example 3 with ProjectService

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

the class ProjectEventsControllerTest method setup.

@Before
public void setup() {
    eventService = mock(ProjectEventService.class);
    projectService = mock(ProjectService.class);
    userService = mock(UserService.class);
    controller = new ProjectEventsController(eventService, projectService, userService, messageSource);
}
Also used : ProjectEventsController(ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectEventsController) UserService(ca.corefacility.bioinformatics.irida.service.user.UserService) ProjectService(ca.corefacility.bioinformatics.irida.service.ProjectService) ProjectEventService(ca.corefacility.bioinformatics.irida.service.ProjectEventService) Before(org.junit.Before)

Example 4 with ProjectService

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

the class ProjectMembersControllerTest method setUp.

@Before
public void setUp() {
    projectService = mock(ProjectService.class);
    userService = mock(UserService.class);
    projectUtils = mock(ProjectControllerUtils.class);
    messageSource = mock(MessageSource.class);
    userGroupService = mock(UserGroupService.class);
    controller = new ProjectMembersController(projectUtils, projectService, userService, userGroupService, messageSource);
    projectTestUtils = new ProjectTestUtils(projectService, userService);
    projectTestUtils.mockSidebarInfo();
}
Also used : ProjectMembersController(ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectMembersController) UserService(ca.corefacility.bioinformatics.irida.service.user.UserService) UserGroupService(ca.corefacility.bioinformatics.irida.service.user.UserGroupService) ProjectControllerUtils(ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectControllerUtils) ProjectService(ca.corefacility.bioinformatics.irida.service.ProjectService) MessageSource(org.springframework.context.MessageSource) Before(org.junit.Before)

Example 5 with ProjectService

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

the class ProjectSamplesControllerTest method setUp.

@Before
public void setUp() {
    projectService = mock(ProjectService.class);
    sampleService = mock(SampleService.class);
    sequencingObjectService = mock(SequencingObjectService.class);
    projectUtils = mock(ProjectControllerUtils.class);
    messageSource = mock(MessageSource.class);
    controller = new ProjectSamplesController(projectService, sampleService, sequencingObjectService, projectUtils, messageSource);
    user.setId(1L);
    mockSidebarInfo();
}
Also used : SequencingObjectService(ca.corefacility.bioinformatics.irida.service.SequencingObjectService) SampleService(ca.corefacility.bioinformatics.irida.service.sample.SampleService) ProjectControllerUtils(ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectControllerUtils) ProjectService(ca.corefacility.bioinformatics.irida.service.ProjectService) MessageSource(org.springframework.context.MessageSource) ProjectSamplesController(ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectSamplesController) Before(org.junit.Before)

Aggregations

ProjectService (ca.corefacility.bioinformatics.irida.service.ProjectService)13 Before (org.junit.Before)13 UserService (ca.corefacility.bioinformatics.irida.service.user.UserService)9 MessageSource (org.springframework.context.MessageSource)9 SampleService (ca.corefacility.bioinformatics.irida.service.sample.SampleService)5 ProjectControllerUtils (ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectControllerUtils)4 SequencingObjectService (ca.corefacility.bioinformatics.irida.service.SequencingObjectService)4 CartController (ca.corefacility.bioinformatics.irida.ria.web.analysis.CartController)3 UpdateSamplePermission (ca.corefacility.bioinformatics.irida.security.permissions.sample.UpdateSamplePermission)3 ReferenceFileService (ca.corefacility.bioinformatics.irida.service.ReferenceFileService)2 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)2 RequestAttributes (org.springframework.web.context.request.RequestAttributes)2 ServletRequestAttributes (org.springframework.web.context.request.ServletRequestAttributes)2 ReferenceFile (ca.corefacility.bioinformatics.irida.model.project.ReferenceFile)1 User (ca.corefacility.bioinformatics.irida.model.user.User)1 AnalysisSubmissionSampleProcessor (ca.corefacility.bioinformatics.irida.pipeline.results.AnalysisSubmissionSampleProcessor)1 GalaxyToolDataService (ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyToolDataService)1 UsersController (ca.corefacility.bioinformatics.irida.ria.web.UsersController)1 ReferenceFileController (ca.corefacility.bioinformatics.irida.ria.web.files.ReferenceFileController)1 DTUser (ca.corefacility.bioinformatics.irida.ria.web.models.datatables.DTUser)1