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()); }
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)); }
public void testDoesNotIncludeReleaseMessageWhenReleasedAtLeastOnce() throws Exception { study.setDevelopmentAmendment(new Amendment()); assertNull(actual().getMessagesIgnoringRevisionMessages()); }
public void testTemplateAvailabilityIsAvailableAndInDevelopment() throws Exception { study.setDevelopmentAmendment(new Amendment()); assertAvailabilityPresent(TemplateAvailability.AVAILABLE); assertAvailabilityPresent(TemplateAvailability.IN_DEVELOPMENT); assertAvailabilityNotPresent(TemplateAvailability.PENDING); }
public void testIsDevelopmentWhenUserCanSeeDevelopment() throws Exception { study.setDevelopmentAmendment(new Amendment()); assertAvailabilityPresent(TemplateAvailability.IN_DEVELOPMENT); }
public void testIsNotDevelopmentWhenNotInDevelopment() throws Exception { study.setDevelopmentAmendment(null); assertAvailabilityNotPresent(TemplateAvailability.IN_DEVELOPMENT); }