1 package org.onap.aai.sparky.viewandinspect.entity;
4 import static org.junit.Assert.assertNotNull;
5 import static org.junit.Assert.assertNull;
7 import java.util.HashMap;
10 import org.junit.Before;
11 import org.junit.Test;
13 public class GizmoEntityTest {
15 private GizmoEntity gizmoEntity;
16 private Map<String, String> props;
17 private GizmoRelationshipHint[] gizmoRelationshipHintArr;
22 public void init() throws Exception {
24 gizmoEntity = new GizmoEntity();
25 props = new HashMap<String, String>();
29 public void updateValues() {
32 gizmoEntity.setId("1664646");
33 assertNotNull(gizmoEntity.getId());
34 gizmoEntity.setType("pserver");
35 assertNotNull(gizmoEntity.getType());
36 gizmoEntity.setUrl("https://magicaltest.com:6666/v2/tenant-id/servers/vserver-id");
37 assertNotNull(gizmoEntity.getUrl());
38 gizmoEntity.setProperties(props);
39 assertNotNull(gizmoEntity.getProperties());
40 gizmoEntity.setIn(gizmoRelationshipHintArr);
41 assertNull(gizmoEntity.getIn());
42 gizmoEntity.setOut(gizmoRelationshipHintArr);
43 assertNull(gizmoEntity.getOut());
44 assertNotNull(gizmoEntity.toString());
47 gizmoEntity.setId(null);
48 assertNull(gizmoEntity.getId());
49 gizmoEntity.setType(null);
50 assertNull(gizmoEntity.getType());
51 gizmoEntity.setUrl(null);
52 assertNull(gizmoEntity.getUrl());
53 gizmoEntity.setProperties(null);
54 assertNull(gizmoEntity.getProperties());
55 gizmoEntity.setIn(null);
56 assertNull(gizmoEntity.getIn());
57 gizmoEntity.setOut(null);
58 assertNull(gizmoEntity.getOut());
59 assertNotNull(gizmoEntity.toString());