use of org.onap.so.db.catalog.beans.ServiceProxyResourceCustomization in project so by onap.
the class VrfValidationTest method testVrfCatalogDbChecks.
@Test
public void testVrfCatalogDbChecks() throws VrfBondingServiceException {
Service service = new Service();
service.setModelName("modelName");
ConfigurationResourceCustomization configuration = new ConfigurationResourceCustomization();
service.setConfigurationCustomizations(new ArrayList<>());
service.getConfigurationCustomizations().add(configuration);
ServiceProxyResourceCustomization serviceProxy = new ServiceProxyResourceCustomization();
configuration.setServiceProxyResourceCustomization(serviceProxy);
service.setServiceProxyCustomizations(new ArrayList<>());
service.getServiceProxyCustomizations().add(serviceProxy);
Service sourceService = new Service();
sourceService.setServiceType("TRANSPORT");
serviceProxy.setSourceService(sourceService);
configuration.setType("VRF-ENTRY");
configuration.setRole("INFRASTRUCTURE-CLOUD-VPN");
ExpectedException.none();
vrfValidation.vrfCatalogDbChecks(service);
}
use of org.onap.so.db.catalog.beans.ServiceProxyResourceCustomization in project so by onap.
the class BBInputSetupTest method testGetServiceProxy.
@Test
public void testGetServiceProxy() {
ServiceProxy expected = new ServiceProxy();
expected.setType("TRANSPORT");
expected.setModelInfoServiceProxy(new ModelInfoServiceProxy());
expected.getModelInfoServiceProxy().setModelUuid("modelUUID");
expected.getModelInfoServiceProxy().setModelInstanceName("modelInstanceName");
expected.setServiceInstance(new ServiceInstance());
expected.getServiceInstance().setModelInfoServiceInstance(new ModelInfoServiceInstance());
expected.getServiceInstance().getModelInfoServiceInstance().setModelUuid("modelUUID");
expected.getServiceInstance().getModelInfoServiceInstance().setServiceType("TRANSPORT");
Service service = new Service();
ServiceProxyResourceCustomization serviceProxyCatalog = new ServiceProxyResourceCustomization();
serviceProxyCatalog.setModelCustomizationUUID("modelCustomizationUUID");
serviceProxyCatalog.setModelInstanceName("modelInstanceName");
Service sourceService = new Service();
sourceService.setModelUUID("modelUUID");
sourceService.setServiceType("TRANSPORT");
serviceProxyCatalog.setSourceService(sourceService);
service.setServiceProxyCustomizations(new ArrayList<ServiceProxyResourceCustomization>());
service.getServiceProxyCustomizations().add(serviceProxyCatalog);
ServiceProxy actual = SPY_bbInputSetup.getServiceProxy(service);
assertThat(actual, sameBeanAs(expected));
}
Aggregations