use of com.epam.ta.reportportal.ws.model.project.email.ProjectNotificationConfigDTO in project service-api by reportportal.
the class ProjectControllerTest method updateProjectNotificationConfig.
@Test
void updateProjectNotificationConfig() throws Exception {
ProjectNotificationConfigDTO request = new ProjectNotificationConfigDTO();
SenderCaseDTO senderCaseDTO = new SenderCaseDTO();
senderCaseDTO.setSendCase("always");
senderCaseDTO.setRecipients(Collections.singletonList("default"));
senderCaseDTO.setLaunchNames(Collections.singletonList("test launch"));
senderCaseDTO.setEnabled(true);
ItemAttributeResource launchAttribute = new ItemAttributeResource();
launchAttribute.setKey("key");
launchAttribute.setValue("val");
senderCaseDTO.setAttributes(Sets.newHashSet(launchAttribute));
request.setSenderCases(singletonList(senderCaseDTO));
mockMvc.perform(put("/v1/project/default_personal/notification").with(token(oAuthHelper.getDefaultToken())).contentType(APPLICATION_JSON).content(objectMapper.writeValueAsBytes(request))).andExpect(status().isOk());
}
Aggregations