use of org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoConfiguration in project so by onap.
the class GeneralTopologyObjectMapperTest method buildConfigurationInformationTest_includesOnapModelInfo.
@Test
public void buildConfigurationInformationTest_includesOnapModelInfo() {
Configuration configuration = new Configuration();
configuration.setConfigurationId("testConfigurationId");
configuration.setConfigurationType("VNR");
configuration.setConfigurationName("VNRCONF");
ModelInfoConfiguration modelInfoConfiguration = new ModelInfoConfiguration();
modelInfoConfiguration.setModelVersionId("modelVersionId");
modelInfoConfiguration.setModelInvariantId("modelInvariantId");
modelInfoConfiguration.setModelCustomizationId("modelCustomizationId");
configuration.setModelInfoConfiguration(modelInfoConfiguration);
GenericResourceApiConfigurationinformationConfigurationInformation configurationInformation = genObjMapper.buildConfigurationInformation(configuration, true);
assertEquals(configuration.getConfigurationId(), configurationInformation.getConfigurationId());
assertEquals(configuration.getConfigurationType(), configurationInformation.getConfigurationType());
assertEquals(configuration.getConfigurationName(), configurationInformation.getConfigurationName());
assertNotNull(configurationInformation.getOnapModelInformation());
assertEquals(configuration.getModelInfoConfiguration().getModelVersionId(), configurationInformation.getOnapModelInformation().getModelUuid());
assertEquals(configuration.getModelInfoConfiguration().getModelInvariantId(), configurationInformation.getOnapModelInformation().getModelInvariantUuid());
assertEquals(configuration.getModelInfoConfiguration().getModelCustomizationId(), configurationInformation.getOnapModelInformation().getModelCustomizationUuid());
}
use of org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoConfiguration in project so by onap.
the class BBInputSetupMapperLayerTest method testmapCatalogConfigurationToConfiguration.
@Test
public void testmapCatalogConfigurationToConfiguration() {
String modelCustUUID = "modelCustomizationUUID";
String modelInvariantUUID = "modelInvariantUUID";
String modelVersionUUID = "modelUUID";
String policyName = "policyName";
ModelInfoConfiguration expected = new ModelInfoConfiguration();
expected.setModelCustomizationId(modelCustUUID);
expected.setModelInvariantId(modelInvariantUUID);
expected.setModelVersionId(modelVersionUUID);
expected.setPolicyName(policyName);
ConfigurationResourceCustomization configurationResourceCustomization = new ConfigurationResourceCustomization();
configurationResourceCustomization.setModelCustomizationUUID(modelCustUUID);
configurationResourceCustomization.setConfigurationResource(new ConfigurationResource());
configurationResourceCustomization.getConfigurationResource().setModelInvariantUUID(modelInvariantUUID);
configurationResourceCustomization.getConfigurationResource().setModelUUID(modelVersionUUID);
CvnfcConfigurationCustomization policyNameTable = new CvnfcConfigurationCustomization();
policyNameTable.setCvnfcCustomization(new CvnfcCustomization());
policyNameTable.getCvnfcCustomization().setVnfcCustomization(new VnfcCustomization());
policyNameTable.setPolicyName(policyName);
ModelInfoConfiguration actual = bbInputSetupMapperLayer.mapCatalogConfigurationToConfiguration(configurationResourceCustomization, policyNameTable);
assertThat(actual, sameBeanAs(expected));
}
use of org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoConfiguration in project so by onap.
the class TestDataSetup method buildConfiguration.
public Configuration buildConfiguration() {
configurationCounter++;
Configuration configuration = new Configuration();
configuration.setConfigurationId("testConfigurationId" + configurationCounter);
configuration.setConfigurationName("testConfigurationName" + configurationCounter);
ModelInfoConfiguration modelInfoConfiguration = new ModelInfoConfiguration();
modelInfoConfiguration.setModelVersionId("testModelVersionId" + configurationCounter);
modelInfoConfiguration.setModelInvariantId("testModelInvariantId" + configurationCounter);
modelInfoConfiguration.setModelCustomizationId("testModelCustomizationId" + configurationCounter);
configuration.setModelInfoConfiguration(modelInfoConfiguration);
return configuration;
}
Aggregations