Search in sources :

Example 6 with SniroManagerRequest

use of org.onap.so.client.sniro.beans.SniroManagerRequest in project so by onap.

the class SniroClientTestIT method testPostDemands_success.

@Test(expected = Test.None.class)
public void testPostDemands_success() throws BadResponseException, JsonProcessingException {
    String mockResponse = "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"corys cool\", \"requestStatus\": \"accepted\"}";
    wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2")).willReturn(aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
    client.postDemands(new SniroManagerRequest());
}
Also used : SniroManagerRequest(org.onap.so.client.sniro.beans.SniroManagerRequest) BaseIntegrationTest(org.onap.so.BaseIntegrationTest) Test(org.junit.Test)

Aggregations

SniroManagerRequest (org.onap.so.client.sniro.beans.SniroManagerRequest)6 Test (org.junit.Test)5 BaseIntegrationTest (org.onap.so.BaseIntegrationTest)5 BpmnError (org.camunda.bpm.engine.delegate.BpmnError)1 Customer (org.onap.so.bpmn.servicedecomposition.bbobjects.Customer)1 ServiceInstance (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance)1 GeneralBuildingBlock (org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock)1 RequestContext (org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext)1 RequestParameters (org.onap.so.bpmn.servicedecomposition.generalobjects.RequestParameters)1 ModelInfoServiceInstance (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance)1 BadResponseException (org.onap.so.client.exception.BadResponseException)1 Demand (org.onap.so.client.sniro.beans.Demand)1 LicenseInfo (org.onap.so.client.sniro.beans.LicenseInfo)1 PlacementInfo (org.onap.so.client.sniro.beans.PlacementInfo)1 RequestInfo (org.onap.so.client.sniro.beans.RequestInfo)1 ServiceInfo (org.onap.so.client.sniro.beans.ServiceInfo)1