summaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/test/java
diff options
context:
space:
mode:
authorMerkel, Jeff <jeff.merkel@att.com>2019-11-04 13:58:28 -0500
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-11-04 13:58:29 -0500
commita0416e82024eaed4b3f9eff111207521e9c3a796 (patch)
tree75f03b6a28a76811e805659b0a82c41b2fe6d797 /asdc-controller/src/test/java
parent4ec5384dc1fac74d0fde85a4c941fe7aba233069 (diff)
- Updated to use getEntity API for ServiceProxy
- Updated to use getEntity API for ServiceProxy - Updated configurationCustomization tests for IEntityDetails. - Replaced the getMetadataPropertyValue method. - fixed the formatting so the build job works Issue-ID: SO-2510 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: If0f624b1160b095f8faf64fa67797016a14e4cfe
Diffstat (limited to 'asdc-controller/src/test/java')
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java
index ffad137ad7..958519f879 100644
--- a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java
+++ b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java
@@ -622,8 +622,8 @@ public class ToscaResourceInstallerTest extends BaseTest {
}
private void prepareConfigurationResource() {
- doReturn(metadata).when(nodeTemplate).getMetaData();
- doReturn(MockConstants.TEMPLATE_TYPE).when(nodeTemplate).getType();
+ doReturn(metadata).when(entityDetails).getMetadata();
+ doReturn(MockConstants.TEMPLATE_TYPE).when(entityDetails).getToscaType();
doReturn(MockConstants.MODEL_NAME).when(metadata).getValue(SdcPropertyNames.PROPERTY_NAME_NAME);
doReturn(MockConstants.MODEL_INVARIANT_UUID).when(metadata)
@@ -639,7 +639,7 @@ public class ToscaResourceInstallerTest extends BaseTest {
public void getConfigurationResourceTest() {
prepareConfigurationResource();
- ConfigurationResource configResource = toscaInstaller.getConfigurationResource(nodeTemplate);
+ ConfigurationResource configResource = toscaInstaller.getConfigurationResource(entityDetails);
assertNotNull(configResource);
assertEquals(MockConstants.MODEL_NAME, configResource.getModelName());
@@ -647,7 +647,7 @@ public class ToscaResourceInstallerTest extends BaseTest {
assertEquals(MockConstants.MODEL_UUID, configResource.getModelUUID());
assertEquals(MockConstants.MODEL_VERSION, configResource.getModelVersion());
assertEquals(MockConstants.MODEL_DESCRIPTION, configResource.getDescription());
- assertEquals(MockConstants.TEMPLATE_TYPE, nodeTemplate.getType());
+ assertEquals(MockConstants.TEMPLATE_TYPE, entityDetails.getToscaType());
}
private void prepareConfigurationResourceCustomization() {
@@ -655,13 +655,11 @@ public class ToscaResourceInstallerTest extends BaseTest {
doReturn(MockConstants.MODEL_CUSTOMIZATIONUUID).when(metadata)
.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID);
doReturn(csarHelper).when(toscaResourceStructure).getSdcCsarHelper();
- doReturn(null).when(csarHelper).getNodeTemplatePropertyLeafValue(nodeTemplate,
- SdcPropertyNames.PROPERTY_NAME_NFFUNCTION);
- doReturn(null).when(csarHelper).getNodeTemplatePropertyLeafValue(nodeTemplate,
- SdcPropertyNames.PROPERTY_NAME_NFROLE);
- doReturn(null).when(csarHelper).getNodeTemplatePropertyLeafValue(nodeTemplate,
- SdcPropertyNames.PROPERTY_NAME_NFTYPE);
doReturn(MockConstants.MODEL_CUSTOMIZATIONUUID).when(spResourceCustomization).getModelCustomizationUUID();
+ doReturn(null).when(toscaInstaller).getLeafPropertyValue(entityDetails,
+ SdcPropertyNames.PROPERTY_NAME_NFFUNCTION);
+ doReturn(null).when(toscaInstaller).getLeafPropertyValue(entityDetails, SdcPropertyNames.PROPERTY_NAME_NFROLE);
+ doReturn(null).when(toscaInstaller).getLeafPropertyValue(entityDetails, SdcPropertyNames.PROPERTY_NAME_NFTYPE);
}
@@ -670,7 +668,7 @@ public class ToscaResourceInstallerTest extends BaseTest {
prepareConfigurationResourceCustomization();
ConfigurationResourceCustomization configurationResourceCustomization =
- toscaInstaller.getConfigurationResourceCustomization(nodeTemplate, toscaResourceStructure,
+ toscaInstaller.getConfigurationResourceCustomization(entityDetails, toscaResourceStructure,
spResourceCustomization, service);
assertNotNull(configurationResourceCustomization);
assertNotNull(configurationResourceCustomization.getConfigurationResource());