use of org.graylog.events.notifications.types.EmailEventNotificationConfig in project graylog2-server by Graylog2.
the class NotificationDtoTest method testValidateEmailWithEmptyConfigParameters.
@Test
public void testValidateEmailWithEmptyConfigParameters() {
final EmailEventNotificationConfig emptyConfig = EmailEventNotificationConfig.Builder.create().sender("").subject("").bodyTemplate("").htmlBodyTemplate("").build();
final NotificationDto emptyNotification = getEmailNotification().toBuilder().config(emptyConfig).build();
final ValidationResult validationResult = emptyNotification.validate();
assertThat(validationResult.failed()).isTrue();
assertThat(validationResult.getErrors().size()).isEqualTo(3);
assertThat(validationResult.getErrors()).containsOnlyKeys("subject", "body", "recipients");
}
Aggregations