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;
26 import java.util.List;
30 public class CapabilityDataTest {
32 private CapabilityData createTestSubject() {
33 return new CapabilityData();
37 public void testCtor() throws Exception {
38 new CapabilityData(new HashMap<>());
42 public void testGetUniqueId() throws Exception {
43 CapabilityData testSubject;
47 testSubject = createTestSubject();
48 result = testSubject.getUniqueId();
53 public void testSetUniqueId() throws Exception {
54 CapabilityData testSubject;
58 testSubject = createTestSubject();
59 testSubject.setUniqueId(uniqueId);
64 public void testGetDescription() throws Exception {
65 CapabilityData testSubject;
69 testSubject = createTestSubject();
70 result = testSubject.getDescription();
75 public void testSetDescription() throws Exception {
76 CapabilityData testSubject;
77 String description = "";
80 testSubject = createTestSubject();
81 testSubject.setDescription(description);
86 public void testGetType() throws Exception {
87 CapabilityData testSubject;
91 testSubject = createTestSubject();
92 result = testSubject.getType();
97 public void testSetType() throws Exception {
98 CapabilityData testSubject;
102 testSubject = createTestSubject();
103 testSubject.setType(type);
108 public void testGetValidSourceTypes() throws Exception {
109 CapabilityData testSubject;
113 testSubject = createTestSubject();
114 result = testSubject.getValidSourceTypes();
119 public void testSetValidSourceTypes() throws Exception {
120 CapabilityData testSubject;
121 List<String> validSourceTypes = null;
124 testSubject = createTestSubject();
125 testSubject.setValidSourceTypes(validSourceTypes);
130 public void testGetCreationTime() throws Exception {
131 CapabilityData testSubject;
135 testSubject = createTestSubject();
136 result = testSubject.getCreationTime();
141 public void testSetCreationTime() throws Exception {
142 CapabilityData testSubject;
143 Long creationTime = null;
146 testSubject = createTestSubject();
147 testSubject.setCreationTime(creationTime);
152 public void testGetModificationTime() throws Exception {
153 CapabilityData testSubject;
157 testSubject = createTestSubject();
158 result = testSubject.getModificationTime();
163 public void testSetModificationTime() throws Exception {
164 CapabilityData testSubject;
165 Long modificationTime = null;
168 testSubject = createTestSubject();
169 testSubject.setModificationTime(modificationTime);
174 public void testGetMinOccurrences() throws Exception {
175 CapabilityData testSubject;
179 testSubject = createTestSubject();
180 result = testSubject.getMinOccurrences();
185 public void testSetMinOccurrences() throws Exception {
186 CapabilityData testSubject;
187 String minOccurrences = "";
190 testSubject = createTestSubject();
191 minOccurrences = null;
192 testSubject.setMinOccurrences(minOccurrences);
195 testSubject = createTestSubject();
197 testSubject.setMinOccurrences(minOccurrences);
202 public void testGetMaxOccurrences() throws Exception {
203 CapabilityData testSubject;
207 testSubject = createTestSubject();
208 result = testSubject.getMaxOccurrences();
213 public void testSetMaxOccurrences() throws Exception {
214 CapabilityData testSubject;
215 String maxOccurrences = "";
218 testSubject = createTestSubject();
219 maxOccurrences = null;
220 testSubject.setMaxOccurrences(maxOccurrences);
223 testSubject = createTestSubject();
225 testSubject.setMaxOccurrences(maxOccurrences);
230 public void testToGraphMap() throws Exception {
231 CapabilityData testSubject;
232 Map<String, Object> result;
235 testSubject = createTestSubject();
236 result = testSubject.toGraphMap();
241 public void testToString() throws Exception {
242 CapabilityData testSubject;
246 testSubject = createTestSubject();
247 result = testSubject.toString();