2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.sdc.be.dao.graph.datatype;
23 import org.junit.Assert;
24 import org.junit.Test;
25 import org.openecomp.sdc.be.dao.neo4j.GraphEdgeLabels;
27 import java.util.HashMap;
30 public class GraphEdgeTest {
32 private GraphEdge createTestSubject() {
33 return new GraphEdge();
37 public void testCtor() throws Exception {
38 new GraphEdge(GraphEdgeLabels.ADDITIONAL_INFORMATION, new HashMap<>());
42 public void testGetEdgeType() throws Exception {
43 GraphEdge testSubject;
44 GraphEdgeLabels result;
47 testSubject = createTestSubject();
48 result = testSubject.getEdgeType();
52 public void testSetEdgeType() throws Exception {
53 GraphEdge testSubject;
54 GraphEdgeLabels edgeType = null;
57 testSubject = createTestSubject();
58 testSubject.setEdgeType(edgeType);
62 public void testGetProperties() throws Exception {
63 GraphEdge testSubject;
64 Map<String, Object> result;
67 testSubject = createTestSubject();
68 result = testSubject.getProperties();
72 public void testSetProperties() throws Exception {
73 GraphEdge testSubject;
74 Map<String, Object> properties = null;
77 testSubject = createTestSubject();
78 testSubject.setProperties(properties);
82 public void testHashCode() throws Exception {
83 GraphEdge testSubject;
87 testSubject = createTestSubject();
88 result = testSubject.hashCode();
92 public void testEquals() throws Exception {
93 GraphEdge testSubject;
98 testSubject = createTestSubject();
100 result = testSubject.equals(obj);
101 Assert.assertEquals(false, result);
103 result = testSubject.equals(testSubject);
104 Assert.assertEquals(true, result);
106 result = testSubject.equals(createTestSubject());
107 Assert.assertEquals(true, result);
109 result = testSubject.equals(new Object());
110 Assert.assertEquals(false, result);
114 public void testToString() throws Exception {
115 GraphEdge testSubject;
119 testSubject = createTestSubject();
120 result = testSubject.toString();