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