Search in sources :

Example 1 with ProcessorContext

use of com.redhat.service.bridge.integration.tests.context.ProcessorContext in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.

the class ProcessorSteps method addFakeProcessorToBridge.

@When("^add a fake Processor \"([^\"]*)\" to the Bridge \"([^\"]*)\"$")
public void addFakeProcessorToBridge(String processorName, String testBridgeName) {
    BridgeContext bridgeContext = context.getBridge(testBridgeName);
    ProcessorContext processorContext = bridgeContext.newProcessor(processorName, Utils.generateId(processorName));
    processorContext.setDeleted(true);
}
Also used : BridgeContext(com.redhat.service.bridge.integration.tests.context.BridgeContext) ProcessorContext(com.redhat.service.bridge.integration.tests.context.ProcessorContext) When(io.cucumber.java.en.When)

Example 2 with ProcessorContext

use of com.redhat.service.bridge.integration.tests.context.ProcessorContext in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.

the class ProcessorSteps method listOfBridgeInstancesIsContainingBridge.

@And("^the list of Processor instances of the Bridge \"([^\"]*)\" is containing the Processor \"([^\"]*)\"$")
public void listOfBridgeInstancesIsContainingBridge(String testBridgeName, String processorName) {
    BridgeContext bridgeContext = context.getBridge(testBridgeName);
    ProcessorContext processorContext = bridgeContext.getProcessor(processorName);
    ProcessorListResponse response = ProcessorResource.getProcessorList(context.getManagerToken(), bridgeContext.getId());
    assertThat(response.getItems()).anyMatch(p -> p.getId().equals(processorContext.getId()));
}
Also used : ProcessorListResponse(com.redhat.service.bridge.manager.api.models.responses.ProcessorListResponse) BridgeContext(com.redhat.service.bridge.integration.tests.context.BridgeContext) ProcessorContext(com.redhat.service.bridge.integration.tests.context.ProcessorContext) And(io.cucumber.java.en.And)

Aggregations

BridgeContext (com.redhat.service.bridge.integration.tests.context.BridgeContext)2 ProcessorContext (com.redhat.service.bridge.integration.tests.context.ProcessorContext)2 ProcessorListResponse (com.redhat.service.bridge.manager.api.models.responses.ProcessorListResponse)1 And (io.cucumber.java.en.And)1 When (io.cucumber.java.en.When)1