Beispiel #1
0
 private StudyWorkflowStatus actual() {
   SuiteRoleMembership mem =
       AuthorizationScopeMappings.createSuiteRoleMembership(PscRole.STUDY_QA_MANAGER)
           .forSites(nu, vanderbilt);
   return new StudyWorkflowStatus(
       study,
       AuthorizationObjectFactory.createPscUser("jo", mem),
       new WorkflowMessageFactory(),
       Fixtures.getTestingDeltaService(),
       configuration);
 }
Beispiel #2
0
 public void testIsNotDevelopmentWhenUserCannotSeeDevelopment() throws Exception {
   study.setDevelopmentAmendment(new Amendment());
   SuiteRoleMembership mem =
       AuthorizationScopeMappings.createSuiteRoleMembership(
               PscRole.STUDY_SITE_PARTICIPATION_ADMINISTRATOR)
           .forSites(nu, vanderbilt)
           .forAllStudies();
   StudyWorkflowStatus actual =
       new StudyWorkflowStatus(
           study,
           AuthorizationObjectFactory.createPscUser("jo", mem),
           new WorkflowMessageFactory(),
           Fixtures.getTestingDeltaService(),
           configuration);
   assertEquals("Unexpected availability present", 1, actual.getTemplateAvailabilities().size());
   assertFalse(
       "Unexpected availability present",
       actual.getTemplateAvailabilities().contains(TemplateAvailability.IN_DEVELOPMENT));
 }