use of com.redhat.service.smartevents.infra.validations.ValidationResult in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class WebhookActionValidatorTest method isValid.
@ParameterizedTest
@MethodSource("validParams")
void isValid(Map<String, String> params) {
ValidationResult validationResult = validator.isValid(actionWith(params));
assertThat(validationResult.isValid()).isTrue();
}
use of com.redhat.service.smartevents.infra.validations.ValidationResult in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class WebhookActionValidatorTest method isInvalidWithNullParametersMap.
@Test
void isInvalidWithNullParametersMap() {
Action action = new Action();
action.setType(WebhookAction.TYPE);
action.setMapParameters(new HashMap<>());
ValidationResult validationResult = validator.isValid(action);
assertThat(validationResult.isValid()).isFalse();
}
use of com.redhat.service.smartevents.infra.validations.ValidationResult in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class AbstractSourceTest method assertValidationIsInvalid.
protected void assertValidationIsInvalid(T source, String errorMessage) {
ValidationResult validationResult = getValidator().isValid(source);
assertThat(validationResult.isValid()).isFalse();
assertThat(validationResult.getMessage()).startsWith(errorMessage);
}
use of com.redhat.service.smartevents.infra.validations.ValidationResult in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class AwsSqsSourceValidatorTest method isValid.
@ParameterizedTest
@MethodSource("validParams")
void isValid(Map<String, String> params) {
ValidationResult validationResult = validator.isValid(sourceWith(params));
assertThat(validationResult.isValid()).isTrue();
}
use of com.redhat.service.smartevents.infra.validations.ValidationResult in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class SlackSourceValidatorTest method assertIsValid.
private void assertIsValid(Source Source) {
ValidationResult validationResult = validator.isValid(Source);
assertThat(validationResult.isValid()).isTrue();
}
Aggregations