Search in sources :

Example 1 with RollbackVfModuleResponse

use of org.onap.so.adapters.vnfrest.RollbackVfModuleResponse in project so by onap.

the class VnfAdapterClientIT method rollbackVfModuleTest.

@Test
public void rollbackVfModuleTest() throws JsonProcessingException, VnfAdapterClientException {
    RollbackVfModuleRequest request = new RollbackVfModuleRequest();
    VfModuleRollback rollback = new VfModuleRollback();
    rollback.setCloudSiteId(TESTING_ID);
    request.setVfModuleRollback(rollback);
    RollbackVfModuleResponse mockResponse = new RollbackVfModuleResponse();
    mockResponse.setVfModuleRolledback(true);
    wireMockServer.stubFor(delete(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_VNF_ID + "/vf-modules/" + AAI_VF_MODULE_ID + "/rollback")).willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(mapper.writeValueAsString(mockResponse)).withStatus(200)));
    RollbackVfModuleResponse response = client.rollbackVfModule(AAI_VNF_ID, AAI_VF_MODULE_ID, request);
    assertEquals("Testing RollbackVfModule response", true, response.getVfModuleRolledback());
}
Also used : RollbackVfModuleRequest(org.onap.so.adapters.vnfrest.RollbackVfModuleRequest) VfModuleRollback(org.onap.so.adapters.vnfrest.VfModuleRollback) RollbackVfModuleResponse(org.onap.so.adapters.vnfrest.RollbackVfModuleResponse) BaseIntegrationTest(org.onap.so.BaseIntegrationTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 BaseIntegrationTest (org.onap.so.BaseIntegrationTest)1 RollbackVfModuleRequest (org.onap.so.adapters.vnfrest.RollbackVfModuleRequest)1 RollbackVfModuleResponse (org.onap.so.adapters.vnfrest.RollbackVfModuleResponse)1 VfModuleRollback (org.onap.so.adapters.vnfrest.VfModuleRollback)1