use of com.redhat.service.bridge.actions.ValidationResult in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class SlackActionValidatorTest method assertIsValid.
private void assertIsValid(BaseAction action) {
ValidationResult validationResult = validator.isValid(action);
assertThat(validationResult.isValid()).isTrue();
}
use of com.redhat.service.bridge.actions.ValidationResult in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class SendToBridgeActionValidatorTest method assertIsValid.
private void assertIsValid(BaseAction action) {
ValidationResult validationResult = validator.isValid(action);
assertThat(validationResult.isValid()).isTrue();
}
use of com.redhat.service.bridge.actions.ValidationResult in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class SendToBridgeActionValidatorTest method assertIsInvalid.
private void assertIsInvalid(BaseAction action, String errorMessage) {
ValidationResult validationResult = validator.isValid(action);
assertThat(validationResult.isValid()).isFalse();
if (errorMessage == null) {
assertThat(validationResult.getMessage()).isNull();
} else {
assertThat(validationResult.getMessage()).startsWith(errorMessage);
}
}
use of com.redhat.service.bridge.actions.ValidationResult in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class KafkaTopicActionValidatorTest method isValid_emptyTopicStringIsNotValid.
@Test
public void isValid_emptyTopicStringIsNotValid() {
ProcessorDTO processor = createProcessorWithActionForTopic("myTopic");
processor.getDefinition().getResolvedAction().getParameters().put(KafkaTopicAction.TOPIC_PARAM, "");
ValidationResult validationResult = validator.isValid(processor.getDefinition().getResolvedAction());
assertThat(validationResult.isValid()).isFalse();
assertThat(validationResult.getMessage()).isEqualTo(KafkaTopicActionValidator.INVALID_TOPIC_PARAM_MESSAGE);
}
Aggregations