aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/test
diff options
context:
space:
mode:
authorMerkel, Jeff <jeff.merkel@att.com>2019-08-13 19:10:26 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-08-13 19:10:26 -0400
commit9867c204ddf8e1f08fb4f170735e35cb4fd86936 (patch)
tree30f437f93fa09c1478176e7db006519c62c70492 /asdc-controller/src/test
parent1852a85bb287e3316c7917a18ea3125821026ec9 (diff)
- 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) <mb388a@att.com> Change-Id: I278aebe5174dfb52ad3db86957c262dca5eac359
Diffstat (limited to 'asdc-controller/src/test')
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java10
1 files changed, 7 insertions, 3 deletions
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;
@@ -49,6 +50,9 @@ public class ToscaResourceInputTest {
NodeTemplate nodeTemplate;
@Mock
+ IEntityDetails entityDetails;
+
+ @Mock
Property property;
@Mock
@@ -65,16 +69,16 @@ public class ToscaResourceInputTest {
Map<String, Object> 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<Input> 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);
}