re base code
[sdc.git] / catalog-dao / src / test / java / org / openecomp / sdc / be / dao / graph / datatype / GraphRelationTest.java
1 package org.openecomp.sdc.be.dao.graph.datatype;
2
3 import org.junit.Test;
4
5 import java.util.HashMap;
6 import java.util.Map;
7
8 public class GraphRelationTest {
9
10         private GraphRelation createTestSubject() {
11                 return new GraphRelation();
12         }
13
14         @Test
15         public void testCtor() throws Exception {
16                 new GraphRelation("mock");
17         }
18         
19         @Test
20         public void testGetFrom() throws Exception {
21                 GraphRelation testSubject;
22                 RelationEndPoint result;
23
24                 // default test
25                 testSubject = createTestSubject();
26                 result = testSubject.getFrom();
27         }
28
29         @Test
30         public void testSetFrom() throws Exception {
31                 GraphRelation testSubject;
32                 RelationEndPoint from = null;
33
34                 // default test
35                 testSubject = createTestSubject();
36                 testSubject.setFrom(from);
37         }
38
39         @Test
40         public void testGetTo() throws Exception {
41                 GraphRelation testSubject;
42                 RelationEndPoint result;
43
44                 // default test
45                 testSubject = createTestSubject();
46                 result = testSubject.getTo();
47         }
48
49         @Test
50         public void testSetTo() throws Exception {
51                 GraphRelation testSubject;
52                 RelationEndPoint to = null;
53
54                 // default test
55                 testSubject = createTestSubject();
56                 testSubject.setTo(to);
57         }
58
59         @Test
60         public void testGetType() throws Exception {
61                 GraphRelation testSubject;
62                 String result;
63
64                 // default test
65                 testSubject = createTestSubject();
66                 result = testSubject.getType();
67         }
68
69         @Test
70         public void testSetType() throws Exception {
71                 GraphRelation testSubject;
72                 String type = "";
73
74                 // default test
75                 testSubject = createTestSubject();
76                 testSubject.setType(type);
77         }
78
79         @Test
80         public void testAddProperty() throws Exception {
81                 GraphRelation testSubject;
82                 String property = "";
83                 Object value = null;
84
85                 // test 1
86                 testSubject = createTestSubject();
87                 property = null;
88                 value = null;
89                 testSubject.addProperty(property, value);
90
91                 // test 2
92                 testSubject = createTestSubject();
93                 property = "";
94                 value = null;
95                 testSubject.addProperty(property, value);
96
97                 // test 3
98                 testSubject = createTestSubject();
99                 value = null;
100                 property = null;
101                 testSubject.addProperty(property, value);
102                 
103                 testSubject = createTestSubject();
104                 value = new Object();
105                 property = "mock";
106                 testSubject.addProperty(property, value);
107         }
108
109         @Test
110         public void testAddPropertis() throws Exception {
111                 GraphRelation testSubject;
112                 Map<String, Object> props = null;
113
114                 // default test
115                 testSubject = createTestSubject();
116                 testSubject.addPropertis(props);
117                 props = new HashMap<>();
118                 testSubject.addPropertis(props);
119         }
120
121         @Test
122         public void testOverwritePropertis() throws Exception {
123                 GraphRelation testSubject;
124                 Map<String, Object> props = null;
125
126                 // default test
127                 testSubject = createTestSubject();
128                 testSubject.overwritePropertis(props);
129         }
130
131         @Test
132         public void testGetProperty() throws Exception {
133                 GraphRelation testSubject;
134                 String property = "";
135                 Object result;
136
137                 // default test
138                 testSubject = createTestSubject();
139                 result = testSubject.getProperty(property);
140         }
141
142         @Test
143         public void testToGraphMap() throws Exception {
144                 GraphRelation testSubject;
145                 Map<String, Object> result;
146
147                 // default test
148                 testSubject = createTestSubject();
149                 result = testSubject.toGraphMap();
150         }
151
152         @Test
153         public void testToString() throws Exception {
154                 GraphRelation testSubject;
155                 String result;
156
157                 // default test
158                 testSubject = createTestSubject();
159                 result = testSubject.toString();
160         }
161
162         @Test
163         public void testHashCode() throws Exception {
164                 GraphRelation testSubject;
165                 int result;
166
167                 // default test
168                 testSubject = createTestSubject();
169                 result = testSubject.hashCode();
170         }
171 }