use of org.onap.so.adapters.nwrest.CreateNetworkResponse in project so by onap.
the class NetworkAdapterCreateTasksTest method rollbackCreateNetworkTest.
@Test
public void rollbackCreateNetworkTest() throws Exception {
CreateNetworkResponse createNetworkResponse = new CreateNetworkResponse();
createNetworkResponse.setNetworkStackId("networkStackId");
createNetworkResponse.setNetworkCreated(true);
execution.setVariable("createNetworkResponse", createNetworkResponse);
Optional<CreateNetworkResponse> oCreateNetworkResponse = Optional.of(createNetworkResponse);
String cloudRegionPo = "cloudRegionPo";
execution.setVariable("cloudRegionPo", cloudRegionPo);
doReturn(oCreateNetworkResponse).when(networkAdapterResources).rollbackCreateNetwork(requestContext, cloudRegion, orchestrationContext, serviceInstance, l3Network, userInput, cloudRegionPo, createNetworkResponse);
networkAdapterCreateTasks.rollbackCreateNetwork(execution);
verify(networkAdapterResources, times(1)).rollbackCreateNetwork(requestContext, cloudRegion, orchestrationContext, serviceInstance, l3Network, userInput, cloudRegionPo, createNetworkResponse);
}
Aggregations