summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/viewandinspect/entity/GizmoEntityTest.java
diff options
context:
space:
mode:
authorrenealr <reneal.rogers@amdocs.com>2018-03-28 09:45:08 -0400
committerrenealr <reneal.rogers@amdocs.com>2018-03-28 11:38:32 -0400
commitdc48060d3bdbd51583d61544311a3db7e9438496 (patch)
tree1cfff37f1045980e16a3ee94b9cc1aef65baabd8 /sparkybe-onap-service/src/test/java/org/onap/aai/sparky/viewandinspect/entity/GizmoEntityTest.java
parentb51c84fa89da9ca5c3b4bc85646004bb39ee36e3 (diff)
Add test cases to increase coverage
added test cases to increase coverage deleted classes that are not being used to increase coverage re-added the logic to ensure suggestions are enabled using search data service updated rest client aai schema and logging services version in pom file Issue-ID: AAI-951 Change-Id: Ie35813bc633a9e249a29baec1df8beefef91b10c Signed-off-by: renealr <reneal.rogers@amdocs.com>
Diffstat (limited to 'sparkybe-onap-service/src/test/java/org/onap/aai/sparky/viewandinspect/entity/GizmoEntityTest.java')
-rw-r--r--sparkybe-onap-service/src/test/java/org/onap/aai/sparky/viewandinspect/entity/GizmoEntityTest.java62
1 files changed, 62 insertions, 0 deletions
diff --git a/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/viewandinspect/entity/GizmoEntityTest.java b/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/viewandinspect/entity/GizmoEntityTest.java
new file mode 100644
index 0000000..4080a02
--- /dev/null
+++ b/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/viewandinspect/entity/GizmoEntityTest.java
@@ -0,0 +1,62 @@
+package org.onap.aai.sparky.viewandinspect.entity;
+
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class GizmoEntityTest {
+
+ private GizmoEntity gizmoEntity;
+ private Map<String, String> props;
+ private GizmoRelationshipHint[] gizmoRelationshipHintArr;
+
+
+
+ @Before
+ public void init() throws Exception {
+
+ gizmoEntity = new GizmoEntity();
+ props = new HashMap<String, String>();
+ }
+
+ @Test
+ public void updateValues() {
+
+
+ gizmoEntity.setId("1664646");
+ assertNotNull(gizmoEntity.getId());
+ gizmoEntity.setType("pserver");
+ assertNotNull(gizmoEntity.getType());
+ gizmoEntity.setUrl("https://magicaltest.com:6666/v2/tenant-id/servers/vserver-id");
+ assertNotNull(gizmoEntity.getUrl());
+ gizmoEntity.setProperties(props);
+ assertNotNull(gizmoEntity.getProperties());
+ gizmoEntity.setIn(gizmoRelationshipHintArr);
+ assertNull(gizmoEntity.getIn());
+ gizmoEntity.setOut(gizmoRelationshipHintArr);
+ assertNull(gizmoEntity.getOut());
+ assertNotNull(gizmoEntity.toString());
+
+
+ gizmoEntity.setId(null);
+ assertNull(gizmoEntity.getId());
+ gizmoEntity.setType(null);
+ assertNull(gizmoEntity.getType());
+ gizmoEntity.setUrl(null);
+ assertNull(gizmoEntity.getUrl());
+ gizmoEntity.setProperties(null);
+ assertNull(gizmoEntity.getProperties());
+ gizmoEntity.setIn(null);
+ assertNull(gizmoEntity.getIn());
+ gizmoEntity.setOut(null);
+ assertNull(gizmoEntity.getOut());
+ assertNotNull(gizmoEntity.toString());
+
+ }
+}