1 package org.openecomp.sdc.be.datatypes.elements;
3 import org.junit.Assert;
9 public class RequirementDataDefinitionTest {
11 private RequirementDataDefinition createTestSubject() {
12 return new RequirementDataDefinition();
16 public void testCopyConstructor() throws Exception {
17 RequirementDataDefinition testSubject;
21 testSubject = createTestSubject();
22 new RequirementDataDefinition(testSubject);
26 public void testGetUniqueId() throws Exception {
27 RequirementDataDefinition testSubject;
31 testSubject = createTestSubject();
32 result = testSubject.getUniqueId();
37 public void testSetUniqueId() throws Exception {
38 RequirementDataDefinition testSubject;
42 testSubject = createTestSubject();
43 testSubject.setUniqueId(uniqueId);
48 public void testGetName() throws Exception {
49 RequirementDataDefinition testSubject;
53 testSubject = createTestSubject();
54 result = testSubject.getName();
59 public void testSetName() throws Exception {
60 RequirementDataDefinition testSubject;
64 testSubject = createTestSubject();
65 testSubject.setName(name);
70 public void testGetParentName() throws Exception {
71 RequirementDataDefinition testSubject;
75 testSubject = createTestSubject();
76 result = testSubject.getParentName();
81 public void testSetParentName() throws Exception {
82 RequirementDataDefinition testSubject;
83 String parentName = "";
86 testSubject = createTestSubject();
87 testSubject.setParentName(parentName);
92 public void testGetCapability() throws Exception {
93 RequirementDataDefinition testSubject;
97 testSubject = createTestSubject();
98 result = testSubject.getCapability();
103 public void testSetCapability() throws Exception {
104 RequirementDataDefinition testSubject;
105 String capability = "";
108 testSubject = createTestSubject();
109 testSubject.setCapability(capability);
114 public void testGetNode() throws Exception {
115 RequirementDataDefinition testSubject;
119 testSubject = createTestSubject();
120 result = testSubject.getNode();
125 public void testSetNode() throws Exception {
126 RequirementDataDefinition testSubject;
130 testSubject = createTestSubject();
131 testSubject.setNode(node);
136 public void testGetRelationship() throws Exception {
137 RequirementDataDefinition testSubject;
141 testSubject = createTestSubject();
142 result = testSubject.getRelationship();
147 public void testSetRelationship() throws Exception {
148 RequirementDataDefinition testSubject;
149 String relationship = "";
152 testSubject = createTestSubject();
153 testSubject.setRelationship(relationship);
158 public void testGetOwnerId() throws Exception {
159 RequirementDataDefinition testSubject;
163 testSubject = createTestSubject();
164 result = testSubject.getOwnerId();
169 public void testSetOwnerId() throws Exception {
170 RequirementDataDefinition testSubject;
174 testSubject = createTestSubject();
175 testSubject.setOwnerId(ownerId);
180 public void testGetOwnerName() throws Exception {
181 RequirementDataDefinition testSubject;
185 testSubject = createTestSubject();
186 result = testSubject.getOwnerName();
191 public void testSetOwnerName() throws Exception {
192 RequirementDataDefinition testSubject;
193 String ownerName = "";
196 testSubject = createTestSubject();
197 testSubject.setOwnerName(ownerName);
202 public void testGetMinOccurrences() throws Exception {
203 RequirementDataDefinition testSubject;
207 testSubject = createTestSubject();
208 result = testSubject.getMinOccurrences();
213 public void testSetMinOccurrences() throws Exception {
214 RequirementDataDefinition testSubject;
215 String minOccurrences = "";
218 testSubject = createTestSubject();
219 testSubject.setMinOccurrences(minOccurrences);
224 public void testGetLeftOccurrences() throws Exception {
225 RequirementDataDefinition testSubject;
229 testSubject = createTestSubject();
230 result = testSubject.getLeftOccurrences();
235 public void testSetLeftOccurrences() throws Exception {
236 RequirementDataDefinition testSubject;
237 String leftOccurrences = "";
240 testSubject = createTestSubject();
241 testSubject.setLeftOccurrences(leftOccurrences);
246 public void testGetMaxOccurrences() throws Exception {
247 RequirementDataDefinition testSubject;
251 testSubject = createTestSubject();
252 result = testSubject.getMaxOccurrences();
257 public void testSetMaxOccurrences() throws Exception {
258 RequirementDataDefinition testSubject;
259 String maxOccurrences = "";
262 testSubject = createTestSubject();
263 testSubject.setMaxOccurrences(maxOccurrences);
268 public void testSetPath() throws Exception {
269 RequirementDataDefinition testSubject;
270 List<String> path = null;
273 testSubject = createTestSubject();
274 testSubject.setPath(path);
279 public void testGetPath() throws Exception {
280 RequirementDataDefinition testSubject;
284 testSubject = createTestSubject();
285 result = testSubject.getPath();
290 public void testSetSource() throws Exception {
291 RequirementDataDefinition testSubject;
295 testSubject = createTestSubject();
296 testSubject.setSource(source);
301 public void testGetSource() throws Exception {
302 RequirementDataDefinition testSubject;
306 testSubject = createTestSubject();
307 result = testSubject.getSource();
312 public void testAddToPath() throws Exception {
313 RequirementDataDefinition testSubject;
314 String elementInPath = "";
317 testSubject = createTestSubject();
318 testSubject.addToPath(elementInPath);
323 public void testHashCode() throws Exception {
324 RequirementDataDefinition testSubject;
328 testSubject = createTestSubject();
329 result = testSubject.hashCode();
334 public void testEquals() throws Exception {
335 RequirementDataDefinition testSubject;
340 testSubject = createTestSubject();
342 result = testSubject.equals(obj);
343 Assert.assertEquals(false, result);
344 result = testSubject.equals(testSubject);
345 Assert.assertEquals(true, result);
346 result = testSubject.equals(createTestSubject());
347 Assert.assertEquals(true, result);
352 public void testToString() throws Exception {
353 RequirementDataDefinition testSubject;
357 testSubject = createTestSubject();
358 result = testSubject.toString();