From 9867c204ddf8e1f08fb4f170735e35cb4fd86936 Mon Sep 17 00:00:00 2001 From: "Merkel, Jeff" Date: Tue, 13 Aug 2019 19:10:26 -0400 Subject: - Updated vnfc instance groups to use the - Updated vnfc instance groups to use the getEntity API. Issue-ID: SO-2224 Signed-off-by: Benjamin, Max (mb388a) Change-Id: I278aebe5174dfb52ad3db86957c262dca5eac359 --- .../onap/so/asdc/installer/heat/ToscaResourceInputTest.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'asdc-controller/src/test/java/org/onap') diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java index 846eaf47e2..da99efadea 100644 --- a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java +++ b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java @@ -24,6 +24,7 @@ import org.junit.Test; import org.mockito.Mock; import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; +import org.onap.sdc.tosca.parser.api.IEntityDetails; import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; import org.onap.sdc.toscaparser.api.NodeTemplate; import org.onap.sdc.toscaparser.api.Property; @@ -48,6 +49,9 @@ public class ToscaResourceInputTest { @Mock NodeTemplate nodeTemplate; + @Mock + IEntityDetails entityDetails; + @Mock Property property; @@ -65,16 +69,16 @@ public class ToscaResourceInputTest { Map map = new HashMap<>(); map.put("customizationUUID", "69df3303-d2b3-47a1-9d04-41604d3a95fd"); Metadata metadata = new Metadata(map); - when(nodeTemplate.getProperties()).thenReturn(hashMap); + when(entityDetails.getProperties()).thenReturn(hashMap); when(property.getValue()).thenReturn(getInput); when(getInput.getInputName()).thenReturn("nameKey"); when(input.getName()).thenReturn("nameKey"); when(input.getDefault()).thenReturn("defaultValue"); when(getInput.toString()).thenReturn("getinput:[sites,INDEX,role]"); - when(nodeTemplate.getMetaData()).thenReturn(metadata); + when(entityDetails.getMetadata()).thenReturn(metadata); List inputs = new ArrayList<>(); inputs.add(input); - String resourceInput = toscaResourceInstaller.getVnfcResourceInput(nodeTemplate, inputs); + String resourceInput = toscaResourceInstaller.getVnfcResourceInput(entityDetails, inputs); assertEquals("{\\\"key1\\\":\\\"[sites,INDEX,role]|defaultValue\\\"}", resourceInput); } -- cgit 1.2.3-korg