use of com.redhat.service.bridge.infra.models.actions.BaseAction in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class SendToBridgeActionTransformerTest method actionWithBridgeId.
private BaseAction actionWithBridgeId(String bridgeId) {
BaseAction action = actionWithoutBridgeId();
action.getParameters().put(SendToBridgeAction.BRIDGE_ID_PARAM, bridgeId);
return action;
}
use of com.redhat.service.bridge.infra.models.actions.BaseAction in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class SendToBridgeActionTransformerTest method testActionWithoutBridgeId.
@Test
void testActionWithoutBridgeId() {
BaseAction inputAction = actionWithoutBridgeId();
BaseAction transformedAction = transformer.transform(inputAction, bridge.getId(), TEST_CUSTOMER_ID, "");
assertValid(transformedAction, BRIDGE_WEBHOOK);
}
use of com.redhat.service.bridge.infra.models.actions.BaseAction in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class SendToBridgeActionValidatorTest method actionWith.
private BaseAction actionWith(Map<String, String> params) {
BaseAction b = new BaseAction();
b.setType(SendToBridgeAction.TYPE);
b.setParameters(params);
return b;
}
use of com.redhat.service.bridge.infra.models.actions.BaseAction in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class ProcessorDAOTest method createProcessor.
private Processor createProcessor(Bridge bridge, String name) {
Processor p = new Processor();
p.setBridge(bridge);
p.setName(name);
p.setStatus(ManagedResourceStatus.ACCEPTED);
p.setSubmittedAt(ZonedDateTime.now());
p.setPublishedAt(ZonedDateTime.now());
p.setShardId(TestConstants.SHARD_ID);
BaseAction a = new BaseAction();
a.setType(KafkaTopicAction.TYPE);
Map<String, String> params = new HashMap<>();
params.put(KafkaTopicAction.TOPIC_PARAM, TestConstants.DEFAULT_KAFKA_TOPIC);
a.setParameters(params);
ProcessorDefinition definition = new ProcessorDefinition(Collections.emptySet(), null, a);
p.setDefinition(mapper.valueToTree(definition));
processorDAO.persist(p);
return p;
}
use of com.redhat.service.bridge.infra.models.actions.BaseAction in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class Fixtures method createKafkaAction.
public static BaseAction createKafkaAction() {
BaseAction action = new BaseAction();
action.setType(KafkaTopicAction.TYPE);
Map<String, String> params = new HashMap<>();
params.put(KafkaTopicAction.TOPIC_PARAM, "myTopic");
action.setParameters(params);
return action;
}
Aggregations