예제 #1
0
 public void testRevisionWorkflowWhenInDevelopment() throws Exception {
   study.setDevelopmentAmendment(new Amendment());
   RevisionWorkflowStatus actual = actual().getRevisionWorkflowStatus();
   assertNotNull("Should be present", actual);
   assertEquals(
       "For wrong study",
       study.getAssignedIdentifier(),
       actual.getRevisedStudy().getAssignedIdentifier());
 }
예제 #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));
 }
예제 #3
0
 public void testDoesNotIncludeReleaseMessageWhenReleasedAtLeastOnce() throws Exception {
   study.setDevelopmentAmendment(new Amendment());
   assertNull(actual().getMessagesIgnoringRevisionMessages());
 }
예제 #4
0
 public void testTemplateAvailabilityIsAvailableAndInDevelopment() throws Exception {
   study.setDevelopmentAmendment(new Amendment());
   assertAvailabilityPresent(TemplateAvailability.AVAILABLE);
   assertAvailabilityPresent(TemplateAvailability.IN_DEVELOPMENT);
   assertAvailabilityNotPresent(TemplateAvailability.PENDING);
 }
예제 #5
0
 public void testIsDevelopmentWhenUserCanSeeDevelopment() throws Exception {
   study.setDevelopmentAmendment(new Amendment());
   assertAvailabilityPresent(TemplateAvailability.IN_DEVELOPMENT);
 }
예제 #6
0
 public void testIsNotDevelopmentWhenNotInDevelopment() throws Exception {
   study.setDevelopmentAmendment(null);
   assertAvailabilityNotPresent(TemplateAvailability.IN_DEVELOPMENT);
 }