use of com.odysseusinc.arachne.portal.api.v1.dto.AnalysisLockDTO in project ArachneCentralAPI by OHDSI.
the class AnalysisLockingControllerTests method testLockAnalysis.
@Test
@WithUserDetails(value = ADMIN_EMAIL)
@DatabaseSetups({ @DatabaseSetup("/data/users.xml"), @DatabaseSetup("/data/study-with-contributor.xml"), @DatabaseSetup("/data/analysis/analysis-list.xml") })
@ExpectedDatabases({ @ExpectedDatabase(value = "/data/users.xml", assertionMode = NON_STRICT), @ExpectedDatabase(value = "/data/study-with-contributor.xml", assertionMode = NON_STRICT), @ExpectedDatabase(value = "/data/analysis/analysis-after-locking.xml", assertionMode = NON_STRICT) })
public void testLockAnalysis() throws Exception {
AnalysisLockDTO lockFileDTO = new AnalysisLockDTO();
lockFileDTO.setLocked(TRUE);
mvc.perform(post("/api/v1/analysis-management/analyses/{analysisId}/lock", ANALYSIS_ID).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(lockFileDTO))).andExpect(NO_ERROR_CODE);
}
Aggregations