use of ca.corefacility.bioinformatics.irida.model.run.SequencingRun in project irida by phac-nml.
the class SequencingRunServiceImplIT method testDeleteMiseqRunAsTechFail.
@Test(expected = AccessDeniedException.class)
@WithMockUser(username = "tech", password = "password1", roles = "TECHNICIAN")
public void testDeleteMiseqRunAsTechFail() {
// run 2 is not owned by "user"
SequencingRun mr = miseqRunService.read(2L);
miseqRunService.delete(mr.getId());
}
use of ca.corefacility.bioinformatics.irida.model.run.SequencingRun in project irida by phac-nml.
the class SequencingRunServiceImplIT method testUpdateMiseqRunAsSequencer.
@Test
@WithMockUser(username = "sequencer", password = "password1", roles = "SEQUENCER")
public void testUpdateMiseqRunAsSequencer() {
String newDescription = "a different description";
SequencingRun mr = miseqRunService.read(1L);
mr.setDescription(newDescription);
SequencingRun update = miseqRunService.update(mr);
assertEquals(update.getDescription(), newDescription);
}
use of ca.corefacility.bioinformatics.irida.model.run.SequencingRun in project irida by phac-nml.
the class SequencingRunServiceImplIT method testUpdateMiseqRunAsTechFail.
@Test(expected = AccessDeniedException.class)
@WithMockUser(username = "tech", password = "password1", roles = "TECHNICIAN")
public void testUpdateMiseqRunAsTechFail() {
// run 2 is not owned by "user"
SequencingRun mr = miseqRunService.read(2L);
mr.setDescription("different description");
miseqRunService.update(mr);
}
use of ca.corefacility.bioinformatics.irida.model.run.SequencingRun in project irida by phac-nml.
the class SequencingRunServiceImplIT method testReadMiseqRunAsSequencer.
@Test
@WithMockUser(username = "sequencer", password = "password1", roles = "SEQUENCER")
public void testReadMiseqRunAsSequencer() {
SequencingRun mr = miseqRunService.read(1L);
assertNotNull("Created run was not assigned an ID.", mr.getId());
}
use of ca.corefacility.bioinformatics.irida.model.run.SequencingRun in project irida by phac-nml.
the class SequencingRunServiceImplIT method testUpdateMiseqRunAsUserSuccess.
@Test
@WithMockUser(username = "user", password = "password1", roles = "USER")
public void testUpdateMiseqRunAsUserSuccess() {
// run 1 is owned by "user" so should be able to update
SequencingRun mr = miseqRunService.read(1L);
mr.setDescription("different description");
miseqRunService.update(mr);
}
Aggregations