use of com.odysseusinc.arachne.commons.api.v1.dto.CommonProfessionalTypeDTO in project ArachneCentralAPI by OHDSI.
the class ProfessionalTypeControllerTests method testUpdateProfessionalType.
@Test
@DatabaseSetup(value = "/data/professionaltype/professional-type-before-updating.xml")
@ExpectedDatabase(table = "professional_types", value = "/data/professionaltype/professional-type-after-updating.xml", assertionMode = NON_STRICT)
public void testUpdateProfessionalType() throws Exception {
CommonProfessionalTypeDTO professionalTypeDTO = new CommonProfessionalTypeDTO();
professionalTypeDTO.setName(UPDATED_PROFESSIONAL_TYPE_NAME);
professionalTypeDTO.setId(PROFESSIONAL_TYPE_ID);
MvcResult mvcResult = mvc.perform(put("/api/v1/admin/professional-types/" + PROFESSIONAL_TYPE_ID).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(professionalTypeDTO))).andExpect(jsonPath("$.result.id").isNotEmpty()).andExpect(OK_STATUS).andExpect(NO_ERROR_CODE).andReturn();
JSONAssert.assertEquals(UPDATED_PROFESSIONAL_TYPE_JSON_OBJECT, getResultJSONObject(mvcResult), false);
}
use of com.odysseusinc.arachne.commons.api.v1.dto.CommonProfessionalTypeDTO in project ArachneCentralAPI by OHDSI.
the class ProfessionalTypeToProfessionalTypeDTOConverter method convert.
@Override
public CommonProfessionalTypeDTO convert(ProfessionalType source) {
CommonProfessionalTypeDTO professionalTypeDTO = new CommonProfessionalTypeDTO();
professionalTypeDTO.setId(source.getId());
professionalTypeDTO.setName(source.getName());
return professionalTypeDTO;
}
use of com.odysseusinc.arachne.commons.api.v1.dto.CommonProfessionalTypeDTO in project ArachneCentralAPI by OHDSI.
the class UserControllerTests method getUserProfileGeneralDTO.
private UserProfileGeneralDTO getUserProfileGeneralDTO() {
UserProfileGeneralDTO inputDTO = new UserProfileGeneralDTO();
inputDTO.setFirstname(UPDATED_FIRST_NAME);
inputDTO.setLastname(UPDATED_LAST_NAME);
inputDTO.setMiddlename(UPDATED_MIDDLE_NAME);
inputDTO.setAffiliation(UPDATED_AFFILIATION);
inputDTO.setPersonalSummary(UPDATED_PERSONAL_SUMMARY);
CommonProfessionalTypeDTO professionalTypeDTO = new CommonProfessionalTypeDTO();
professionalTypeDTO.setId(PROFESSIONAL_TYPE_ID);
inputDTO.setProfessionalType(professionalTypeDTO);
return inputDTO;
}
Aggregations