Added oparent to sdc main
[sdc.git] / catalog-dao / src / test / java / org / openecomp / sdc / be / dao / graph / datatype / GraphEdgeTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdc.be.dao.graph.datatype;
22
23 import org.junit.Assert;
24 import org.junit.Test;
25 import org.openecomp.sdc.be.dao.neo4j.GraphEdgeLabels;
26
27 import java.util.HashMap;
28 import java.util.Map;
29
30 public class GraphEdgeTest {
31
32         private GraphEdge createTestSubject() {
33                 return new GraphEdge();
34         }
35         
36         @Test
37         public void testCtor() throws Exception {
38                 new GraphEdge(GraphEdgeLabels.ADDITIONAL_INFORMATION, new HashMap<>());
39         }
40
41         @Test
42         public void testGetEdgeType() throws Exception {
43                 GraphEdge testSubject;
44                 GraphEdgeLabels result;
45
46                 // default test
47                 testSubject = createTestSubject();
48                 result = testSubject.getEdgeType();
49         }
50
51         @Test
52         public void testSetEdgeType() throws Exception {
53                 GraphEdge testSubject;
54                 GraphEdgeLabels edgeType = null;
55
56                 // default test
57                 testSubject = createTestSubject();
58                 testSubject.setEdgeType(edgeType);
59         }
60
61         @Test
62         public void testGetProperties() throws Exception {
63                 GraphEdge testSubject;
64                 Map<String, Object> result;
65
66                 // default test
67                 testSubject = createTestSubject();
68                 result = testSubject.getProperties();
69         }
70
71         @Test
72         public void testSetProperties() throws Exception {
73                 GraphEdge testSubject;
74                 Map<String, Object> properties = null;
75
76                 // default test
77                 testSubject = createTestSubject();
78                 testSubject.setProperties(properties);
79         }
80
81         @Test
82         public void testHashCode() throws Exception {
83                 GraphEdge testSubject;
84                 int result;
85
86                 // default test
87                 testSubject = createTestSubject();
88                 result = testSubject.hashCode();
89         }
90
91         @Test
92         public void testEquals() throws Exception {
93                 GraphEdge testSubject;
94                 Object obj = null;
95                 boolean result;
96
97                 // test 1
98                 testSubject = createTestSubject();
99                 obj = null;
100                 result = testSubject.equals(obj);
101                 Assert.assertEquals(false, result);
102                 
103                 result = testSubject.equals(testSubject);
104                 Assert.assertEquals(true, result);
105                 
106                 result = testSubject.equals(createTestSubject());
107                 Assert.assertEquals(true, result);
108                 
109                 result = testSubject.equals(new Object());
110                 Assert.assertEquals(false, result);
111         }
112
113         @Test
114         public void testToString() throws Exception {
115                 GraphEdge testSubject;
116                 String result;
117
118                 // default test
119                 testSubject = createTestSubject();
120                 result = testSubject.toString();
121         }
122 }