Search in sources :

Example 11 with QueryInfo

use of com.redhat.service.bridge.infra.models.QueryInfo in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.

the class BridgesServiceTest method testCreateBridge.

@Test
public void testCreateBridge() {
    BridgeRequest request = new BridgeRequest(TestConstants.DEFAULT_BRIDGE_NAME);
    bridgesService.createBridge(TestConstants.DEFAULT_CUSTOMER_ID, request);
    List<Bridge> bridgesToDeploy = bridgesService.getBridgesByStatusesAndShardId(Collections.singletonList(ManagedResourceStatus.ACCEPTED), TestConstants.SHARD_ID);
    assertThat(bridgesToDeploy.size()).isEqualTo(1);
    assertThat(bridgesToDeploy.get(0).getStatus()).isEqualTo(ManagedResourceStatus.ACCEPTED);
    assertThat(bridgesToDeploy.get(0).getEndpoint()).isNull();
    ListResult<Bridge> bridges = bridgesService.getBridges(TestConstants.DEFAULT_CUSTOMER_ID, new QueryInfo(TestConstants.DEFAULT_PAGE, TestConstants.DEFAULT_PAGE_SIZE));
    assertThat(bridges.getSize()).isEqualTo(1);
}
Also used : BridgeRequest(com.redhat.service.bridge.manager.api.models.requests.BridgeRequest) QueryInfo(com.redhat.service.bridge.infra.models.QueryInfo) Bridge(com.redhat.service.bridge.manager.models.Bridge) QuarkusTest(io.quarkus.test.junit.QuarkusTest) Test(org.junit.jupiter.api.Test)

Aggregations

QueryInfo (com.redhat.service.bridge.infra.models.QueryInfo)11 Bridge (com.redhat.service.bridge.manager.models.Bridge)11 QuarkusTest (io.quarkus.test.junit.QuarkusTest)11 Test (org.junit.jupiter.api.Test)11 Processor (com.redhat.service.bridge.manager.models.Processor)6 BridgeRequest (com.redhat.service.bridge.manager.api.models.requests.BridgeRequest)2 ProcessorRequest (com.redhat.service.bridge.manager.api.models.requests.ProcessorRequest)2 BaseFilter (com.redhat.service.bridge.infra.models.filters.BaseFilter)1 StringEquals (com.redhat.service.bridge.infra.models.filters.StringEquals)1 HashSet (java.util.HashSet)1