use of org.onap.so.serviceinstancebeans.ServiceInstancesRequest in project so by onap.
the class ServiceInstanceRestHandlerTest method createTestRequest.
private ServiceInstancesRequest createTestRequest() {
ServiceInstancesRequest request = new ServiceInstancesRequest();
RequestDetails requestDetails = new RequestDetails();
RequestInfo requestInfo = new RequestInfo();
requestInfo.setInstanceName("instanceName");
requestDetails.setRequestInfo(requestInfo);
request.setRequestDetails(requestDetails);
return request;
}
use of org.onap.so.serviceinstancebeans.ServiceInstancesRequest in project so by onap.
the class ServiceInstancesTest method setServiceInstanceIdTest.
@Test
public void setServiceInstanceIdTest() {
String requestScope = "vnf";
ServiceInstancesRequest sir = new ServiceInstancesRequest();
sir.setServiceInstanceId("f0a35706-efc4-4e27-80ea-a995d7a2a40f");
assertEquals("f0a35706-efc4-4e27-80ea-a995d7a2a40f", requestHandlerUtils.setServiceInstanceId(requestScope, sir));
}
use of org.onap.so.serviceinstancebeans.ServiceInstancesRequest in project so by onap.
the class ServiceInstancesTest method handleReplaceInstance_retainAssignments_Test.
@Test
public void handleReplaceInstance_retainAssignments_Test() throws JsonParseException, JsonMappingException, IOException {
String replaceVfModule = inputStream("/ReplaceVfModuleRetainAssignments.json");
ObjectMapper mapper = new ObjectMapper();
ServiceInstancesRequest sir = mapper.readValue(replaceVfModule, ServiceInstancesRequest.class);
Actions action = servInstances.handleReplaceInstance(Action.replaceInstance, sir);
assertEquals(Action.replaceInstanceRetainAssignments, action);
}
use of org.onap.so.serviceinstancebeans.ServiceInstancesRequest in project so by onap.
the class VolumeRestHandlerTest method test_saveInstanceName.
@Test
public void test_saveInstanceName() throws MalformedURLException, NoRecipeException {
ServiceInstancesRequest request = createTestRequest();
InfraActiveRequests dbRequest = createDatabaseRecord();
restHandler.saveInstanceName(request, dbRequest);
Mockito.verify(infraActiveRequestsClient, Mockito.times(1)).updateInfraActiveRequests(dbRequest);
assertEquals("InstanceName Should Be Equal", "instanceName", dbRequest.getVolumeGroupName());
}
use of org.onap.so.serviceinstancebeans.ServiceInstancesRequest in project so by onap.
the class VnfDeleteValidatorTest method createServiceInstancesRequest.
public ServiceInstancesRequest createServiceInstancesRequest(boolean alacarte) {
ServiceInstancesRequest sir = new ServiceInstancesRequest();
sir.setRequestDetails(new RequestDetails());
sir.getRequestDetails().setRequestParameters(new RequestParameters());
sir.getRequestDetails().getRequestParameters().setaLaCarte(alacarte);
return sir;
}
Aggregations