Search in sources :

Example 1 with ReadSamplePermission

use of ca.corefacility.bioinformatics.irida.security.permissions.sample.ReadSamplePermission 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 2 with ReadSamplePermission

use of ca.corefacility.bioinformatics.irida.security.permissions.sample.ReadSamplePermission in project irida by phac-nml.

the class ReadSamplePermissionTest method setUp.

@Before
public void setUp() {
    sampleRepository = mock(SampleRepository.class);
    psjRepository = mock(ProjectSampleJoinRepository.class);
    readProjectPermission = mock(ReadProjectPermission.class);
    readSamplePermission = new ReadSamplePermission(sampleRepository, psjRepository, readProjectPermission);
}
Also used : SampleRepository(ca.corefacility.bioinformatics.irida.repositories.sample.SampleRepository) ReadProjectPermission(ca.corefacility.bioinformatics.irida.security.permissions.project.ReadProjectPermission) ProjectSampleJoinRepository(ca.corefacility.bioinformatics.irida.repositories.joins.project.ProjectSampleJoinRepository) ReadSamplePermission(ca.corefacility.bioinformatics.irida.security.permissions.sample.ReadSamplePermission) Before(org.junit.Before)

Example 3 with ReadSamplePermission

use of ca.corefacility.bioinformatics.irida.security.permissions.sample.ReadSamplePermission in project irida by phac-nml.

the class ReadSequencingObjectPermissionTest method setUp.

@Before
public void setUp() {
    userRepository = mock(UserRepository.class);
    ssoRepository = mock(SampleSequencingObjectJoinRepository.class);
    sequencingObjectRepository = mock(SequencingObjectRepository.class);
    psjRepository = mock(ProjectSampleJoinRepository.class);
    sampleRepository = mock(SampleRepository.class);
    readProjectPermission = mock(ReadProjectPermission.class);
    samplePermission = new ReadSamplePermission(sampleRepository, psjRepository, readProjectPermission);
    permission = new ReadSequencingObjectPermission(sequencingObjectRepository, samplePermission, ssoRepository);
}
Also used : SampleRepository(ca.corefacility.bioinformatics.irida.repositories.sample.SampleRepository) ReadSequencingObjectPermission(ca.corefacility.bioinformatics.irida.security.permissions.files.ReadSequencingObjectPermission) ReadProjectPermission(ca.corefacility.bioinformatics.irida.security.permissions.project.ReadProjectPermission) UserRepository(ca.corefacility.bioinformatics.irida.repositories.user.UserRepository) ProjectSampleJoinRepository(ca.corefacility.bioinformatics.irida.repositories.joins.project.ProjectSampleJoinRepository) SequencingObjectRepository(ca.corefacility.bioinformatics.irida.repositories.sequencefile.SequencingObjectRepository) SampleSequencingObjectJoinRepository(ca.corefacility.bioinformatics.irida.repositories.joins.sample.SampleSequencingObjectJoinRepository) ReadSamplePermission(ca.corefacility.bioinformatics.irida.security.permissions.sample.ReadSamplePermission) Before(org.junit.Before)

Aggregations

ReadSamplePermission (ca.corefacility.bioinformatics.irida.security.permissions.sample.ReadSamplePermission)3 Before (org.junit.Before)3 ProjectSampleJoinRepository (ca.corefacility.bioinformatics.irida.repositories.joins.project.ProjectSampleJoinRepository)2 SampleRepository (ca.corefacility.bioinformatics.irida.repositories.sample.SampleRepository)2 ReadProjectPermission (ca.corefacility.bioinformatics.irida.security.permissions.project.ReadProjectPermission)2 SampleSequencingObjectJoinRepository (ca.corefacility.bioinformatics.irida.repositories.joins.sample.SampleSequencingObjectJoinRepository)1 SequencingObjectRepository (ca.corefacility.bioinformatics.irida.repositories.sequencefile.SequencingObjectRepository)1 UserRepository (ca.corefacility.bioinformatics.irida.repositories.user.UserRepository)1 SamplesController (ca.corefacility.bioinformatics.irida.ria.web.samples.SamplesController)1 ReadSequencingObjectPermission (ca.corefacility.bioinformatics.irida.security.permissions.files.ReadSequencingObjectPermission)1 UpdateSamplePermission (ca.corefacility.bioinformatics.irida.security.permissions.sample.UpdateSamplePermission)1 ProjectService (ca.corefacility.bioinformatics.irida.service.ProjectService)1 SequencingObjectService (ca.corefacility.bioinformatics.irida.service.SequencingObjectService)1 MetadataTemplateService (ca.corefacility.bioinformatics.irida.service.sample.MetadataTemplateService)1 SampleService (ca.corefacility.bioinformatics.irida.service.sample.SampleService)1 MessageSource (org.springframework.context.MessageSource)1