re base code
[sdc.git] / catalog-dao / src / test / java / org / openecomp / sdc / be / dao / graph / datatype / GraphEdgeTest.java
1 package org.openecomp.sdc.be.dao.graph.datatype;
2
3 import org.junit.Assert;
4 import org.junit.Test;
5 import org.openecomp.sdc.be.dao.neo4j.GraphEdgeLabels;
6
7 import java.util.HashMap;
8 import java.util.Map;
9
10 public class GraphEdgeTest {
11
12         private GraphEdge createTestSubject() {
13                 return new GraphEdge();
14         }
15         
16         @Test
17         public void testCtor() throws Exception {
18                 new GraphEdge(GraphEdgeLabels.ADDITIONAL_INFORMATION, new HashMap<>());
19         }
20
21         @Test
22         public void testGetEdgeType() throws Exception {
23                 GraphEdge testSubject;
24                 GraphEdgeLabels result;
25
26                 // default test
27                 testSubject = createTestSubject();
28                 result = testSubject.getEdgeType();
29         }
30
31         @Test
32         public void testSetEdgeType() throws Exception {
33                 GraphEdge testSubject;
34                 GraphEdgeLabels edgeType = null;
35
36                 // default test
37                 testSubject = createTestSubject();
38                 testSubject.setEdgeType(edgeType);
39         }
40
41         @Test
42         public void testGetProperties() throws Exception {
43                 GraphEdge testSubject;
44                 Map<String, Object> result;
45
46                 // default test
47                 testSubject = createTestSubject();
48                 result = testSubject.getProperties();
49         }
50
51         @Test
52         public void testSetProperties() throws Exception {
53                 GraphEdge testSubject;
54                 Map<String, Object> properties = null;
55
56                 // default test
57                 testSubject = createTestSubject();
58                 testSubject.setProperties(properties);
59         }
60
61         @Test
62         public void testHashCode() throws Exception {
63                 GraphEdge testSubject;
64                 int result;
65
66                 // default test
67                 testSubject = createTestSubject();
68                 result = testSubject.hashCode();
69         }
70
71         @Test
72         public void testEquals() throws Exception {
73                 GraphEdge testSubject;
74                 Object obj = null;
75                 boolean result;
76
77                 // test 1
78                 testSubject = createTestSubject();
79                 obj = null;
80                 result = testSubject.equals(obj);
81                 Assert.assertEquals(false, result);
82                 
83                 result = testSubject.equals(testSubject);
84                 Assert.assertEquals(true, result);
85                 
86                 result = testSubject.equals(createTestSubject());
87                 Assert.assertEquals(true, result);
88                 
89                 result = testSubject.equals(new Object());
90                 Assert.assertEquals(false, result);
91         }
92
93         @Test
94         public void testToString() throws Exception {
95                 GraphEdge testSubject;
96                 String result;
97
98                 // default test
99                 testSubject = createTestSubject();
100                 result = testSubject.toString();
101         }
102 }