use of com.redhat.service.bridge.infra.models.actions.BaseAction in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class SendToBridgeActionTransformerTest method actionWithoutBridgeId.
private BaseAction actionWithoutBridgeId() {
BaseAction action = new BaseAction();
action.setType(SendToBridgeAction.TYPE);
return action;
}
use of com.redhat.service.bridge.infra.models.actions.BaseAction in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class SendToBridgeActionTransformerTest method testActionWithoutOtherBridgeId.
@Test
void testActionWithoutOtherBridgeId() {
BaseAction inputAction = actionWithoutBridgeId();
BaseAction transformedAction = transformer.transform(inputAction, otherBridge.getId(), TEST_CUSTOMER_ID, "");
assertValid(transformedAction, OTHER_BRIDGE_WEBHOOK);
}
use of com.redhat.service.bridge.infra.models.actions.BaseAction in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class SendToBridgeActionTransformerTest method testActionWithUnknownBridgeId.
@Test
void testActionWithUnknownBridgeId() {
BaseAction inputAction = actionWithBridgeId(UNKNOWN_BRIDGE_ID);
ProcessorRequest inputRequest = requestWithAction(inputAction);
assertThatExceptionOfType(ItemNotFoundException.class).isThrownBy(() -> transformer.transform(inputRequest.getAction(), bridge.getId(), TEST_CUSTOMER_ID, ""));
}
use of com.redhat.service.bridge.infra.models.actions.BaseAction in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class KafkaTopicActionValidatorTest method createProcessorWithActionForTopic.
private ProcessorDTO createProcessorWithActionForTopic(String topicName) {
BaseAction b = new BaseAction();
b.setType(KafkaTopicAction.TYPE);
Map<String, String> params = new HashMap<>();
params.put(KafkaTopicAction.TOPIC_PARAM, topicName);
b.setParameters(params);
ProcessorDTO p = new ProcessorDTO();
p.setId("myProcessor");
p.setDefinition(new ProcessorDefinition(null, null, b));
p.setBridgeId("myBridge");
return p;
}
use of com.redhat.service.bridge.infra.models.actions.BaseAction in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class WebhookActionValidatorTest method createActionWithEndpoint.
private BaseAction createActionWithEndpoint(String endpoint) {
BaseAction b = new BaseAction();
b.setType(WebhookAction.TYPE);
Map<String, String> params = new HashMap<>();
params.put(WebhookAction.ENDPOINT_PARAM, endpoint);
b.setParameters(params);
return b;
}
Aggregations