1 package org.openecomp.sdc.be.dao.graph.datatype;
5 import java.util.HashMap;
8 public class GraphRelationTest {
10 private GraphRelation createTestSubject() {
11 return new GraphRelation();
15 public void testCtor() throws Exception {
16 new GraphRelation("mock");
20 public void testGetFrom() throws Exception {
21 GraphRelation testSubject;
22 RelationEndPoint result;
25 testSubject = createTestSubject();
26 result = testSubject.getFrom();
30 public void testSetFrom() throws Exception {
31 GraphRelation testSubject;
32 RelationEndPoint from = null;
35 testSubject = createTestSubject();
36 testSubject.setFrom(from);
40 public void testGetTo() throws Exception {
41 GraphRelation testSubject;
42 RelationEndPoint result;
45 testSubject = createTestSubject();
46 result = testSubject.getTo();
50 public void testSetTo() throws Exception {
51 GraphRelation testSubject;
52 RelationEndPoint to = null;
55 testSubject = createTestSubject();
56 testSubject.setTo(to);
60 public void testGetType() throws Exception {
61 GraphRelation testSubject;
65 testSubject = createTestSubject();
66 result = testSubject.getType();
70 public void testSetType() throws Exception {
71 GraphRelation testSubject;
75 testSubject = createTestSubject();
76 testSubject.setType(type);
80 public void testAddProperty() throws Exception {
81 GraphRelation testSubject;
86 testSubject = createTestSubject();
89 testSubject.addProperty(property, value);
92 testSubject = createTestSubject();
95 testSubject.addProperty(property, value);
98 testSubject = createTestSubject();
101 testSubject.addProperty(property, value);
103 testSubject = createTestSubject();
104 value = new Object();
106 testSubject.addProperty(property, value);
110 public void testAddPropertis() throws Exception {
111 GraphRelation testSubject;
112 Map<String, Object> props = null;
115 testSubject = createTestSubject();
116 testSubject.addPropertis(props);
117 props = new HashMap<>();
118 testSubject.addPropertis(props);
122 public void testOverwritePropertis() throws Exception {
123 GraphRelation testSubject;
124 Map<String, Object> props = null;
127 testSubject = createTestSubject();
128 testSubject.overwritePropertis(props);
132 public void testGetProperty() throws Exception {
133 GraphRelation testSubject;
134 String property = "";
138 testSubject = createTestSubject();
139 result = testSubject.getProperty(property);
143 public void testToGraphMap() throws Exception {
144 GraphRelation testSubject;
145 Map<String, Object> result;
148 testSubject = createTestSubject();
149 result = testSubject.toGraphMap();
153 public void testToString() throws Exception {
154 GraphRelation testSubject;
158 testSubject = createTestSubject();
159 result = testSubject.toString();
163 public void testHashCode() throws Exception {
164 GraphRelation testSubject;
168 testSubject = createTestSubject();
169 result = testSubject.hashCode();