Search in sources :

Example 1 with ActionInvoker

use of com.redhat.service.bridge.actions.ActionInvoker in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.

the class WebhookActionTest method testInvokerOk.

@Test
void testInvokerOk() {
    ProcessorDTO processor = createProcessorWithActionForEndpoint("http://www.example.com/webhook");
    ActionInvoker actionInvoker = webhookAction.getActionInvoker(processor, processor.getDefinition().getResolvedAction());
    assertThat(actionInvoker).isNotNull().isInstanceOf(WebhookInvoker.class);
}
Also used : ActionInvoker(com.redhat.service.bridge.actions.ActionInvoker) ProcessorDTO(com.redhat.service.bridge.infra.models.dto.ProcessorDTO) Test(org.junit.jupiter.api.Test) QuarkusTest(io.quarkus.test.junit.QuarkusTest)

Example 2 with ActionInvoker

use of com.redhat.service.bridge.actions.ActionInvoker in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.

the class KafkaTopicActionTest method getActionInvoker.

@Test
public void getActionInvoker() {
    ProcessorDTO p = createProcessorWithActionForTopic(TOPIC_NAME);
    ActionInvoker actionInvoker = kafkaTopicAction.getActionInvoker(p, p.getDefinition().getResolvedAction());
    assertThat(actionInvoker).isNotNull();
    verify(kafkaAdmin).listTopics();
}
Also used : ActionInvoker(com.redhat.service.bridge.actions.ActionInvoker) ProcessorDTO(com.redhat.service.bridge.infra.models.dto.ProcessorDTO) QuarkusTest(io.quarkus.test.junit.QuarkusTest) Test(org.junit.jupiter.api.Test)

Aggregations

ActionInvoker (com.redhat.service.bridge.actions.ActionInvoker)2 ProcessorDTO (com.redhat.service.bridge.infra.models.dto.ProcessorDTO)2 QuarkusTest (io.quarkus.test.junit.QuarkusTest)2 Test (org.junit.jupiter.api.Test)2