summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCoreBPMN/src/test
diff options
context:
space:
mode:
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>2019-04-26 14:39:55 +0530
committersubhash kumar singh <subhash.kumar.singh@huawei.com>2019-04-26 15:19:57 +0530
commit0bb58cfbe91dd7b77178f775df16d873131eb1ef (patch)
tree9fccc081d5aee0b4ac9ecde1553cdf812aa05cc3 /bpmn/MSOCoreBPMN/src/test
parent0164ebaeecf27e635b3b4097034780dbb8be7c74 (diff)
Removed JsonIgnore for resourceInput
Removed JsonIgnore for resourceinput, it was earlier made @jsonIgnore to fix mapping (SO-1358). Change-Id: I7eb7160be220d445bec396d4c5eb3fd913e66f9e Issue-ID: SO-1816 Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
Diffstat (limited to 'bpmn/MSOCoreBPMN/src/test')
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java
index 09bcfe8470..b23633b4d8 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/VnfResourceTest.java
@@ -58,6 +58,19 @@ public class VnfResourceTest {
VnfResource vnfResource = objectMapper.readValue(jsonStr, VnfResource.class);
assertTrue(vnfResource != null);
+ assertEquals("sample", vnfResource.getResourceInput());
+ assertEquals("home", vnfResource.getVnfHostname());
+ }
+
+ @Test
+ public void vnfResourceMapperTestNoResourceInput() throws IOException {
+ String jsonStr = "{\"vnfHostname\": \"home\"}";
+ ObjectMapper objectMapper = new ObjectMapper();
+ VnfResource vnfResource = objectMapper.readValue(jsonStr, VnfResource.class);
+
+ assertTrue(vnfResource != null);
+ assertEquals(null, vnfResource.getResourceInput());
+ assertEquals("home", vnfResource.getVnfHostname());
}
@Test