Search in sources :

Example 16 with ConnectorEntity

use of com.redhat.service.smartevents.manager.models.ConnectorEntity in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.

the class Fixtures method createConnector.

private static ConnectorEntity createConnector(Processor p, ManagedResourceStatus status, ConnectorType type, String connectorTypeId) {
    ConnectorEntity connector = new ConnectorEntity();
    connector.setType(type);
    connector.setName(TestConstants.DEFAULT_CONNECTOR_NAME);
    connector.setProcessor(p);
    connector.setStatus(status);
    connector.setSubmittedAt(ZonedDateTime.now());
    connector.setPublishedAt(ZonedDateTime.now());
    connector.setDefinition(new TextNode("definition"));
    connector.setTopicName(TestConstants.DEFAULT_KAFKA_TOPIC);
    connector.setConnectorTypeId(connectorTypeId);
    connector.setConnectorExternalId("connectorExternalId");
    return connector;
}
Also used : ConnectorEntity(com.redhat.service.smartevents.manager.models.ConnectorEntity) TextNode(com.fasterxml.jackson.databind.node.TextNode)

Aggregations

ConnectorEntity (com.redhat.service.smartevents.manager.models.ConnectorEntity)16 Processor (com.redhat.service.smartevents.manager.models.Processor)8 Bridge (com.redhat.service.smartevents.manager.models.Bridge)7 Transactional (javax.transaction.Transactional)6 Work (com.redhat.service.smartevents.manager.models.Work)5 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)5 MethodSource (org.junit.jupiter.params.provider.MethodSource)5 Connector (com.openshift.cloud.api.connector.models.Connector)3 ConnectorStatusStatus (com.openshift.cloud.api.connector.models.ConnectorStatusStatus)3 QuarkusTest (io.quarkus.test.junit.QuarkusTest)3 Test (org.junit.jupiter.api.Test)3 TextNode (com.fasterxml.jackson.databind.node.TextNode)1 ConnectorRequest (com.openshift.cloud.api.connector.models.ConnectorRequest)1 Topic (com.openshift.cloud.api.kas.auth.models.Topic)1 Action (com.redhat.service.smartevents.infra.models.gateways.Action)1 ProcessorRequest (com.redhat.service.smartevents.manager.api.models.requests.ProcessorRequest)1 SlackAction (com.redhat.service.smartevents.processor.actions.slack.SlackAction)1