use of com.odysseusinc.arachne.portal.api.v1.dto.StudyDTO in project ArachneCentralAPI by OHDSI.
the class StudyControllerTests method testUpdateStudyStatus.
@Test
@WithUserDetails(value = ADMIN_EMAIL)
@DatabaseSetup("/data/study/study-before-updating.xml")
@ExpectedDatabases({ @ExpectedDatabase(value = "/data/study/study-after-updating-status.xml", assertionMode = NON_STRICT_UNORDERED) })
public void testUpdateStudyStatus() throws Exception {
StudyDTO updatedStudyDTO = new StudyDTO();
updatedStudyDTO.setId(STUDY_ID);
updatedStudyDTO.setDescription("description");
StudyTypeDTO type = new StudyTypeDTO(STUDY_TYPE_ID);
type.setName("type1");
updatedStudyDTO.setType(type);
StudyStatusDTO status = new StudyStatusDTO(2L, "Active");
updatedStudyDTO.setStatus(status);
testUpdate(updatedStudyDTO, UPDATED_STUDY_STATUS_JSON_OBJECT, "Active");
}
use of com.odysseusinc.arachne.portal.api.v1.dto.StudyDTO in project ArachneCentralAPI by OHDSI.
the class StudyControllerTests method testUpdateStudyDescription.
@Test
@WithUserDetails(value = ADMIN_EMAIL)
@DatabaseSetup("/data/study/study-before-updating.xml")
@ExpectedDatabases({ @ExpectedDatabase(value = "/data/study/study-after-updating-description.xml", assertionMode = NON_STRICT) })
public void testUpdateStudyDescription() throws Exception {
StudyDTO updatedStudyDTO = new StudyDTO();
updatedStudyDTO.setId(STUDY_ID);
updatedStudyDTO.setDescription(UPDATED_DESCRIPTION);
StudyStatusDTO status = new StudyStatusDTO(STUDY_STATUS_ID, "Initiate");
updatedStudyDTO.setStatus(status);
testUpdate(updatedStudyDTO, UPDATED_STUDY_JSON_OBJECT, null);
}
Aggregations