Added oparent to sdc main
[sdc.git] / catalog-model / src / test / java / org / openecomp / sdc / be / model / UploadResourceInfoTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.openecomp.sdc.be.model;
22
23 import org.junit.Assert;
24 import org.junit.Test;
25 import org.openecomp.sdc.be.model.category.CategoryDefinition;
26 import org.openecomp.sdc.common.api.UploadArtifactInfo;
27
28 import java.util.LinkedList;
29 import java.util.List;
30
31 public class UploadResourceInfoTest {
32
33         private UploadResourceInfo createTestSubject() {
34                 return new UploadResourceInfo();
35         }
36
37         @Test
38         public void testCtor() throws Exception {
39                 new UploadResourceInfo("mock", "mock", "mock", "mock/mock/mock", new LinkedList<>(), new LinkedList<>());
40
41         }
42
43         @Test
44         public void testGetPayloadData() throws Exception {
45                 UploadResourceInfo testSubject;
46                 String result;
47
48                 // default test
49                 testSubject = createTestSubject();
50                 result = testSubject.getPayloadData();
51         }
52
53         @Test
54         public void testSetPayloadData() throws Exception {
55                 UploadResourceInfo testSubject;
56                 String payload = "";
57
58                 // default test
59                 testSubject = createTestSubject();
60                 testSubject.setPayloadData(payload);
61         }
62
63         @Test
64         public void testGetPayloadName() throws Exception {
65                 UploadResourceInfo testSubject;
66                 String result;
67
68                 // default test
69                 testSubject = createTestSubject();
70                 result = testSubject.getPayloadName();
71         }
72
73         @Test
74         public void testSetPayloadName() throws Exception {
75                 UploadResourceInfo testSubject;
76                 String payloadName = "";
77
78                 // default test
79                 testSubject = createTestSubject();
80                 testSubject.setPayloadName(payloadName);
81         }
82
83         @Test
84         public void testGetDescription() throws Exception {
85                 UploadResourceInfo testSubject;
86                 String result;
87
88                 // default test
89                 testSubject = createTestSubject();
90                 result = testSubject.getDescription();
91         }
92
93         @Test
94         public void testSetDescription() throws Exception {
95                 UploadResourceInfo testSubject;
96                 String description = "";
97
98                 // default test
99                 testSubject = createTestSubject();
100                 testSubject.setDescription(description);
101         }
102
103         @Test
104         public void testGetTags() throws Exception {
105                 UploadResourceInfo testSubject;
106                 List<String> result;
107
108                 // default test
109                 testSubject = createTestSubject();
110                 result = testSubject.getTags();
111         }
112
113         @Test
114         public void testSetTags() throws Exception {
115                 UploadResourceInfo testSubject;
116                 List<String> tags = null;
117
118                 // default test
119                 testSubject = createTestSubject();
120                 testSubject.setTags(tags);
121         }
122
123         @Test
124         public void testGetArtifactList() throws Exception {
125                 UploadResourceInfo testSubject;
126                 List<UploadArtifactInfo> result;
127
128                 // default test
129                 testSubject = createTestSubject();
130                 result = testSubject.getArtifactList();
131         }
132
133         @Test
134         public void testSetArtifactList() throws Exception {
135                 UploadResourceInfo testSubject;
136                 List<UploadArtifactInfo> artifactsList = null;
137
138                 // default test
139                 testSubject = createTestSubject();
140                 testSubject.setArtifactList(artifactsList);
141         }
142
143         @Test
144         public void testHashCode() throws Exception {
145                 UploadResourceInfo testSubject;
146                 int result;
147
148                 // default test
149                 testSubject = createTestSubject();
150                 result = testSubject.hashCode();
151         }
152
153         @Test
154         public void testEquals() throws Exception {
155                 UploadResourceInfo testSubject;
156                 Object obj = null;
157                 boolean result;
158
159                 // test 1
160                 testSubject = createTestSubject();
161                 result = testSubject.equals(obj);
162                 Assert.assertEquals(false, result);
163                 result = testSubject.equals(new Object());
164                 Assert.assertEquals(false, result);
165                 result = testSubject.equals(testSubject);
166                 Assert.assertEquals(true, result);
167                 result = testSubject.equals(createTestSubject());
168                 Assert.assertEquals(true, result);
169         }
170
171         @Test
172         public void testGetContactId() throws Exception {
173                 UploadResourceInfo testSubject;
174                 String result;
175
176                 // default test
177                 testSubject = createTestSubject();
178                 result = testSubject.getContactId();
179         }
180
181         @Test
182         public void testSetContactId() throws Exception {
183                 UploadResourceInfo testSubject;
184                 String userId = "";
185
186                 // default test
187                 testSubject = createTestSubject();
188                 testSubject.setContactId(userId);
189         }
190
191         @Test
192         public void testGetName() throws Exception {
193                 UploadResourceInfo testSubject;
194                 String result;
195
196                 // default test
197                 testSubject = createTestSubject();
198                 result = testSubject.getName();
199         }
200
201         @Test
202         public void testSetName() throws Exception {
203                 UploadResourceInfo testSubject;
204                 String resourceName = "";
205
206                 // default test
207                 testSubject = createTestSubject();
208                 testSubject.setName(resourceName);
209         }
210
211         @Test
212         public void testGetResourceIconPath() throws Exception {
213                 UploadResourceInfo testSubject;
214                 String result;
215
216                 // default test
217                 testSubject = createTestSubject();
218                 result = testSubject.getResourceIconPath();
219         }
220
221         @Test
222         public void testSetResourceIconPath() throws Exception {
223                 UploadResourceInfo testSubject;
224                 String resourceIconPath = "";
225
226                 // default test
227                 testSubject = createTestSubject();
228                 testSubject.setResourceIconPath(resourceIconPath);
229         }
230
231         @Test
232         public void testGetVendorName() throws Exception {
233                 UploadResourceInfo testSubject;
234                 String result;
235
236                 // default test
237                 testSubject = createTestSubject();
238                 result = testSubject.getVendorName();
239         }
240
241         @Test
242         public void testSetVendorName() throws Exception {
243                 UploadResourceInfo testSubject;
244                 String vendorName = "";
245
246                 // default test
247                 testSubject = createTestSubject();
248                 testSubject.setVendorName(vendorName);
249         }
250
251         @Test
252         public void testGetVendorRelease() throws Exception {
253                 UploadResourceInfo testSubject;
254                 String result;
255
256                 // default test
257                 testSubject = createTestSubject();
258                 result = testSubject.getVendorRelease();
259         }
260
261         @Test
262         public void testSetVendorRelease() throws Exception {
263                 UploadResourceInfo testSubject;
264                 String vendorRelease = "";
265
266                 // default test
267                 testSubject = createTestSubject();
268                 testSubject.setVendorRelease(vendorRelease);
269         }
270
271         @Test
272         public void testGetResourceVendorModelNumber() throws Exception {
273                 UploadResourceInfo testSubject;
274                 String result;
275
276                 // default test
277                 testSubject = createTestSubject();
278                 result = testSubject.getResourceVendorModelNumber();
279         }
280
281         @Test
282         public void testSetResourceVendorModelNumber() throws Exception {
283                 UploadResourceInfo testSubject;
284                 String resourceVendorModelNumber = "";
285
286                 // default test
287                 testSubject = createTestSubject();
288                 testSubject.setResourceVendorModelNumber(resourceVendorModelNumber);
289         }
290
291         @Test
292         public void testSetIcon() throws Exception {
293                 UploadResourceInfo testSubject;
294                 String icon = "";
295
296                 // default test
297                 testSubject = createTestSubject();
298                 testSubject.setIcon(icon);
299         }
300
301         @Test
302         public void testGetResourceType() throws Exception {
303                 UploadResourceInfo testSubject;
304                 String result;
305
306                 // default test
307                 testSubject = createTestSubject();
308                 result = testSubject.getResourceType();
309         }
310
311         @Test
312         public void testSetResourceType() throws Exception {
313                 UploadResourceInfo testSubject;
314                 String resourceType = "";
315
316                 // default test
317                 testSubject = createTestSubject();
318                 testSubject.setResourceType(resourceType);
319         }
320
321         @Test
322         public void testGetCategories() throws Exception {
323                 UploadResourceInfo testSubject;
324                 List<CategoryDefinition> result;
325
326                 // default test
327                 testSubject = createTestSubject();
328                 result = testSubject.getCategories();
329         }
330
331         @Test
332         public void testSetCategories() throws Exception {
333                 UploadResourceInfo testSubject;
334                 List<CategoryDefinition> categories = null;
335
336                 // default test
337                 testSubject = createTestSubject();
338                 testSubject.setCategories(categories);
339         }
340
341         @Test
342         public void testAddSubCategory() throws Exception {
343                 UploadResourceInfo testSubject;
344                 String category = "";
345                 String subCategory = "";
346
347                 // test 1
348                 testSubject = createTestSubject();
349                 category = null;
350                 subCategory = null;
351                 testSubject.addSubCategory(category, subCategory);
352
353                 // test 2
354                 testSubject = createTestSubject();
355                 category = "";
356                 subCategory = null;
357                 testSubject.addSubCategory(category, subCategory);
358
359                 // test 3
360                 testSubject = createTestSubject();
361                 subCategory = "";
362                 category = null;
363                 testSubject.addSubCategory(category, subCategory);
364
365                 // test 4
366                 testSubject = createTestSubject();
367                 subCategory = "mock";
368                 category = "mock";
369                 testSubject.addSubCategory(category, subCategory);
370                 testSubject.addSubCategory(category, subCategory);
371         }
372 }