use of com.redhat.service.bridge.manager.api.models.responses.BridgeListResponse in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class BridgeSteps method listOfBridgeInstancesIsContainingBridge.
@And("^the list of Bridge instances is containing the Bridge \"([^\"]*)\"$")
public void listOfBridgeInstancesIsContainingBridge(String testBridgeName) {
BridgeContext bridgeContext = context.getBridge(testBridgeName);
BridgeListResponse response = BridgeResource.getBridgeList(context.getManagerToken());
assertThat(response.getItems()).anyMatch(b -> b.getId().equals(bridgeContext.getId()));
BridgeResponse bridge = response.getItems().stream().filter(b -> b.getId().equals(bridgeContext.getId())).findFirst().orElseThrow();
assertThat(bridge.getName()).isEqualTo(bridgeContext.getName());
}
use of com.redhat.service.bridge.manager.api.models.responses.BridgeListResponse in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class BridgesAPITest method testCreateAndGetBridge.
@Test
@TestSecurity(user = TestConstants.DEFAULT_CUSTOMER_ID)
public void testCreateAndGetBridge() {
TestUtils.createBridge(new BridgeRequest(TestConstants.DEFAULT_BRIDGE_NAME)).then().statusCode(201);
BridgeListResponse bridgeListResponse = TestUtils.getBridges().as(BridgeListResponse.class);
assertThat(bridgeListResponse.getItems().size()).isEqualTo(1);
BridgeResponse bridgeResponse = bridgeListResponse.getItems().get(0);
assertThat(bridgeResponse.getName()).isEqualTo(TestConstants.DEFAULT_BRIDGE_NAME);
assertThat(bridgeResponse.getStatus()).isEqualTo(ManagedResourceStatus.ACCEPTED);
assertThat(bridgeResponse.getHref()).isEqualTo(APIConstants.USER_API_BASE_PATH + bridgeResponse.getId());
assertThat(bridgeResponse.getSubmittedAt()).isNotNull();
assertThat(bridgeResponse.getEndpoint()).isNull();
}
use of com.redhat.service.bridge.manager.api.models.responses.BridgeListResponse in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class BridgesAPITest method testGetEmptyBridges.
@Test
@TestSecurity(user = TestConstants.DEFAULT_CUSTOMER_ID)
public void testGetEmptyBridges() {
BridgeListResponse response = TestUtils.getBridges().as(BridgeListResponse.class);
assertThat(response.getItems().size()).isZero();
}
Aggregations