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.resources.data;
23 import org.junit.Test;
25 import java.util.HashMap;
29 public class RequirementDataTest {
31 private RequirementData createTestSubject() {
32 return new RequirementData();
36 public void testCtor() throws Exception {
37 new RequirementData(new HashMap<>());
41 public void testToGraphMap() throws Exception {
42 RequirementData testSubject;
43 Map<String, Object> result;
46 testSubject = createTestSubject();
47 result = testSubject.toGraphMap();
52 public void testGetNode() throws Exception {
53 RequirementData testSubject;
57 testSubject = createTestSubject();
58 result = testSubject.getNode();
63 public void testSetNode() throws Exception {
64 RequirementData testSubject;
68 testSubject = createTestSubject();
69 testSubject.setNode(node);
74 public void testGetCreationTime() throws Exception {
75 RequirementData testSubject;
79 testSubject = createTestSubject();
80 result = testSubject.getCreationTime();
85 public void testSetCreationTime() throws Exception {
86 RequirementData testSubject;
87 Long creationTime = null;
90 testSubject = createTestSubject();
91 testSubject.setCreationTime(creationTime);
96 public void testGetModificationTime() throws Exception {
97 RequirementData testSubject;
101 testSubject = createTestSubject();
102 result = testSubject.getModificationTime();
107 public void testSetModificationTime() throws Exception {
108 RequirementData testSubject;
109 Long modificationTime = null;
112 testSubject = createTestSubject();
113 testSubject.setModificationTime(modificationTime);
118 public void testSetUniqueId() throws Exception {
119 RequirementData testSubject;
120 String uniqueId = "";
123 testSubject = createTestSubject();
124 testSubject.setUniqueId(uniqueId);
129 public void testGetRelationshipType() throws Exception {
130 RequirementData testSubject;
134 testSubject = createTestSubject();
135 result = testSubject.getRelationshipType();
140 public void testSetRelationshipType() throws Exception {
141 RequirementData testSubject;
142 String relationshipType = "";
145 testSubject = createTestSubject();
146 testSubject.setRelationshipType(relationshipType);
151 public void testGetMinOccurrences() throws Exception {
152 RequirementData testSubject;
156 testSubject = createTestSubject();
157 result = testSubject.getMinOccurrences();
162 public void testSetMinOccurrences() throws Exception {
163 RequirementData testSubject;
164 String minOccurrences = "";
167 testSubject = createTestSubject();
168 minOccurrences = null;
169 testSubject.setMinOccurrences(minOccurrences);
172 testSubject = createTestSubject();
174 testSubject.setMinOccurrences(minOccurrences);
179 public void testGetMaxOccurrences() throws Exception {
180 RequirementData testSubject;
184 testSubject = createTestSubject();
185 result = testSubject.getMaxOccurrences();
190 public void testSetMaxOccurrences() throws Exception {
191 RequirementData testSubject;
192 String maxOccurrences = "";
195 testSubject = createTestSubject();
196 maxOccurrences = null;
197 testSubject.setMaxOccurrences(maxOccurrences);
200 testSubject = createTestSubject();
202 testSubject.setMaxOccurrences(maxOccurrences);
207 public void testGetUniqueId() throws Exception {
208 RequirementData testSubject;
212 testSubject = createTestSubject();
213 result = testSubject.getUniqueId();
218 public void testToString() throws Exception {
219 RequirementData testSubject;
223 testSubject = createTestSubject();
224 result = testSubject.toString();