use of com.redhat.service.smartevents.manager.api.models.requests.BridgeRequest in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class BridgesAPITest method testAlreadyExistingBridge.
@Test
@TestSecurity(user = DEFAULT_CUSTOMER_ID)
public void testAlreadyExistingBridge() {
TestUtils.createBridge(new BridgeRequest(DEFAULT_BRIDGE_NAME)).then().statusCode(202);
TestUtils.createBridge(new BridgeRequest(DEFAULT_BRIDGE_NAME)).then().statusCode(400);
}
use of com.redhat.service.smartevents.manager.api.models.requests.BridgeRequest in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class BridgesAPITest method getBridge.
@Test
@TestSecurity(user = DEFAULT_CUSTOMER_ID)
public void getBridge() {
Response bridgeCreateResponse = TestUtils.createBridge(new BridgeRequest(DEFAULT_BRIDGE_NAME));
bridgeCreateResponse.then().statusCode(202);
BridgeResponse bridge = bridgeCreateResponse.as(BridgeResponse.class);
BridgeResponse retrievedBridge = TestUtils.getBridge(bridge.getId()).as(BridgeResponse.class);
assertThat(retrievedBridge).isNotNull();
assertThat(retrievedBridge.getId()).isEqualTo(bridge.getId());
assertThat(retrievedBridge.getName()).isEqualTo(bridge.getName());
assertThat(retrievedBridge.getEndpoint()).isEqualTo(bridge.getEndpoint());
}
Aggregations