summaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/vfc/src/test
diff options
context:
space:
mode:
authorRitu Sood <ritu.sood@intel.com>2017-09-11 04:22:17 -0700
committerRitu Sood <ritu.sood@intel.com>2017-09-12 03:38:41 -0700
commitd02b569900c1ea1870eba6647d5b223a89baeebb (patch)
tree2ca5d021fc1407949d3dd4024e1cb2c96c11c1ad /controlloop/common/model-impl/vfc/src/test
parent8d338012d725cb16ebdbff0eb3ff7f47ad08f6d1 (diff)
Fixing VFC Model response class
Fixed the response class for VFC response and also removed the Ignore test case. Change-Id: I4373e86399089b7a3d743be4d19f76cc37d1ceea Issue-id: POLICY-57 Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Diffstat (limited to 'controlloop/common/model-impl/vfc/src/test')
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/TestDemo.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/TestDemo.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/TestDemo.java
index 7e8c212e1..2bdb650ba 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/TestDemo.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/TestDemo.java
@@ -27,9 +27,10 @@ import org.onap.policy.vfc.VFCHealAdditionalParams;
import org.onap.policy.vfc.VFCHealActionVmInfo;
import org.onap.policy.vfc.VFCResponse;
import org.onap.policy.vfc.VFCResponseDescriptor;
-import org.onap.policy.vfc.VFCResponseHistoryList;
import org.junit.Test;
import org.onap.policy.vfc.util.Serialization;
+import java.util.LinkedList;
+import java.util.List;
public class TestDemo {
@@ -74,11 +75,15 @@ public class TestDemo {
responseDescriptor.errorCode = null;
responseDescriptor.responseId = "11";
- response.responseDescriptor.responseHistoryList = new VFCResponseHistoryList();
- response.responseDescriptor.responseHistoryList.responseDescriptorList.add(responseDescriptor);
+ response.responseDescriptor.responseHistoryList = new LinkedList();
+ response.responseDescriptor.responseHistoryList.add(responseDescriptor);
body = Serialization.gsonPretty.toJson(response);
System.out.println(body);
+ response = Serialization.gsonPretty.fromJson(body, VFCResponse.class);
+ body = Serialization.gsonPretty.toJson(response);
+ System.out.println(body);
+
}
}