Search in sources :

Example 6 with ProjectService

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

the class ProjectsControllerTest method setUp.

@Before
public void setUp() {
    projectService = mock(ProjectService.class);
    sampleService = mock(SampleService.class);
    userService = mock(UserService.class);
    projectRemoteService = mock(ProjectRemoteService.class);
    cartController = mock(CartController.class);
    taxonomyService = mock(TaxonomyService.class);
    projectUtils = mock(ProjectControllerUtils.class);
    updateSamplePermission = mock(UpdateSamplePermission.class);
    messageSource = mock(MessageSource.class);
    controller = new ProjectsController(projectService, sampleService, userService, projectRemoteService, projectUtils, taxonomyService, remoteApiService, workflowsService, cartController, updateSamplePermission, messageSource);
    user.setId(1L);
    mockSidebarInfo();
}
Also used : TaxonomyService(ca.corefacility.bioinformatics.irida.service.TaxonomyService) CartController(ca.corefacility.bioinformatics.irida.ria.web.analysis.CartController) SampleService(ca.corefacility.bioinformatics.irida.service.sample.SampleService) UserService(ca.corefacility.bioinformatics.irida.service.user.UserService) ProjectControllerUtils(ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectControllerUtils) ProjectService(ca.corefacility.bioinformatics.irida.service.ProjectService) MessageSource(org.springframework.context.MessageSource) ProjectsController(ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectsController) ProjectRemoteService(ca.corefacility.bioinformatics.irida.service.remote.ProjectRemoteService) UpdateSamplePermission(ca.corefacility.bioinformatics.irida.security.permissions.sample.UpdateSamplePermission) Before(org.junit.Before)

Example 7 with ProjectService

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

the class SamplesControllerTest method setUp.

@Before
public void setUp() {
    sampleService = mock(SampleService.class);
    sequencingObjectService = mock(SequencingObjectService.class);
    projectService = mock(ProjectService.class);
    metadataTemplateService = mock(MetadataTemplateService.class);
    messageSource = mock(MessageSource.class);
    updateSamplePermission = mock(UpdateSamplePermission.class);
    readSamplePermission = mock(ReadSamplePermission.class);
    controller = new SamplesController(sampleService, projectService, sequencingObjectService, updateSamplePermission, metadataTemplateService, messageSource);
}
Also used : SequencingObjectService(ca.corefacility.bioinformatics.irida.service.SequencingObjectService) SamplesController(ca.corefacility.bioinformatics.irida.ria.web.samples.SamplesController) SampleService(ca.corefacility.bioinformatics.irida.service.sample.SampleService) ProjectService(ca.corefacility.bioinformatics.irida.service.ProjectService) MessageSource(org.springframework.context.MessageSource) MetadataTemplateService(ca.corefacility.bioinformatics.irida.service.sample.MetadataTemplateService) ReadSamplePermission(ca.corefacility.bioinformatics.irida.security.permissions.sample.ReadSamplePermission) UpdateSamplePermission(ca.corefacility.bioinformatics.irida.security.permissions.sample.UpdateSamplePermission) Before(org.junit.Before)

Example 8 with ProjectService

use of ca.corefacility.bioinformatics.irida.service.ProjectService 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 9 with ProjectService

use of ca.corefacility.bioinformatics.irida.service.ProjectService 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)

Example 10 with ProjectService

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

the class CartControllerTest method setup.

@Before
public void setup() {
    sampleService = mock(SampleService.class);
    projectService = mock(ProjectService.class);
    userService = mock(UserService.class);
    sequencingObjectService = mock(SequencingObjectService.class);
    messageSource = mock(MessageSource.class);
    controller = new CartController(sampleService, userService, projectService, sequencingObjectService, messageSource);
    testData();
}
Also used : SequencingObjectService(ca.corefacility.bioinformatics.irida.service.SequencingObjectService) CartController(ca.corefacility.bioinformatics.irida.ria.web.analysis.CartController) SampleService(ca.corefacility.bioinformatics.irida.service.sample.SampleService) UserService(ca.corefacility.bioinformatics.irida.service.user.UserService) ProjectService(ca.corefacility.bioinformatics.irida.service.ProjectService) MessageSource(org.springframework.context.MessageSource) 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