summaryrefslogtreecommitdiffstats
path: root/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/graph/datatype/GraphRelationTest.java
blob: 38b63c75c9ae63d70ef520055ef777b9d7283a36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
package org.openecomp.sdc.be.dao.graph.datatype;

import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

public class GraphRelationTest {

	private GraphRelation createTestSubject() {
		return new GraphRelation();
	}

	@Test
	public void testCtor() throws Exception {
		new GraphRelation("mock");
	}
	
	@Test
	public void testGetFrom() throws Exception {
		GraphRelation testSubject;
		RelationEndPoint result;

		// default test
		testSubject = createTestSubject();
		result = testSubject.getFrom();
	}

	@Test
	public void testSetFrom() throws Exception {
		GraphRelation testSubject;
		RelationEndPoint from = null;

		// default test
		testSubject = createTestSubject();
		testSubject.setFrom(from);
	}

	@Test
	public void testGetTo() throws Exception {
		GraphRelation testSubject;
		RelationEndPoint result;

		// default test
		testSubject = createTestSubject();
		result = testSubject.getTo();
	}

	@Test
	public void testSetTo() throws Exception {
		GraphRelation testSubject;
		RelationEndPoint to = null;

		// default test
		testSubject = createTestSubject();
		testSubject.setTo(to);
	}

	@Test
	public void testGetType() throws Exception {
		GraphRelation testSubject;
		String result;

		// default test
		testSubject = createTestSubject();
		result = testSubject.getType();
	}

	@Test
	public void testSetType() throws Exception {
		GraphRelation testSubject;
		String type = "";

		// default test
		testSubject = createTestSubject();
		testSubject.setType(type);
	}

	@Test
	public void testAddProperty() throws Exception {
		GraphRelation testSubject;
		String property = "";
		Object value = null;

		// test 1
		testSubject = createTestSubject();
		property = null;
		value = null;
		testSubject.addProperty(property, value);

		// test 2
		testSubject = createTestSubject();
		property = "";
		value = null;
		testSubject.addProperty(property, value);

		// test 3
		testSubject = createTestSubject();
		value = null;
		property = null;
		testSubject.addProperty(property, value);
		
		testSubject = createTestSubject();
		value = new Object();
		property = "mock";
		testSubject.addProperty(property, value);
	}

	@Test
	public void testAddPropertis() throws Exception {
		GraphRelation testSubject;
		Map<String, Object> props = null;

		// default test
		testSubject = createTestSubject();
		testSubject.addPropertis(props);
		props = new HashMap<>();
		testSubject.addPropertis(props);
	}

	@Test
	public void testOverwritePropertis() throws Exception {
		GraphRelation testSubject;
		Map<String, Object> props = null;

		// default test
		testSubject = createTestSubject();
		testSubject.overwritePropertis(props);
	}

	@Test
	public void testGetProperty() throws Exception {
		GraphRelation testSubject;
		String property = "";
		Object result;

		// default test
		testSubject = createTestSubject();
		result = testSubject.getProperty(property);
	}

	@Test
	public void testToGraphMap() throws Exception {
		GraphRelation testSubject;
		Map<String, Object> result;

		// default test
		testSubject = createTestSubject();
		result = testSubject.toGraphMap();
	}

	@Test
	public void testToString() throws Exception {
		GraphRelation testSubject;
		String result;

		// default test
		testSubject = createTestSubject();
		result = testSubject.toString();
	}

	@Test
	public void testHashCode() throws Exception {
		GraphRelation testSubject;
		int result;

		// default test
		testSubject = createTestSubject();
		result = testSubject.hashCode();
	}
}