Change to enable SDC list type input
[sdc.git] / catalog-model / src / test / java / org / openecomp / sdc / be / model / ComponentParametersViewTest.java
1 package org.openecomp.sdc.be.model;
2
3 import org.junit.Test;
4 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
5 import org.openecomp.sdc.be.datatypes.enums.ComponentFieldsEnum;
6 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
7
8 import java.util.LinkedList;
9
10 import static org.junit.Assert.assertSame;
11
12 public class ComponentParametersViewTest {
13
14         private ComponentParametersView createTestSubject() {
15                 return new ComponentParametersView();
16         }
17
18         @Test
19         public void testCtor() throws Exception {
20                 new ComponentParametersView(true);
21                 
22                 LinkedList<String> linkedList = new LinkedList<>();
23                 for (ComponentFieldsEnum iterable_element : ComponentFieldsEnum.values()) {
24                         linkedList.add(iterable_element.getValue());
25                 }
26                 new ComponentParametersView(linkedList);
27         }
28         
29         @Test
30         public void testFilter() throws Exception {
31                 ComponentParametersView testSubject;
32                 Component component = null;
33                 ComponentTypeEnum componentType = ComponentTypeEnum.RESOURCE;
34                 Component result;
35
36                 // default test
37                 testSubject = createTestSubject();
38                 result = testSubject.filter(component, componentType);
39                 testSubject.disableAll();
40                 result = testSubject.filter(new Resource(), componentType);
41         }
42
43         
44         @Test
45         public void testDisableAll() throws Exception {
46                 ComponentParametersView testSubject;
47
48                 // default test
49                 testSubject = createTestSubject();
50                 testSubject.disableAll();
51         }
52
53         
54         @Test
55         public void testIsIgnoreGroups() throws Exception {
56                 ComponentParametersView testSubject;
57                 boolean result;
58
59                 // default test
60                 testSubject = createTestSubject();
61                 result = testSubject.isIgnoreGroups();
62         }
63
64         
65         @Test
66         public void testSetIgnoreGroups() throws Exception {
67                 ComponentParametersView testSubject;
68                 boolean ignoreGroups = false;
69
70                 // default test
71                 testSubject = createTestSubject();
72                 testSubject.setIgnoreGroups(ignoreGroups);
73         }
74
75         
76         @Test
77         public void testIsIgnoreComponentInstances() throws Exception {
78                 ComponentParametersView testSubject;
79                 boolean result;
80
81                 // default test
82                 testSubject = createTestSubject();
83                 result = testSubject.isIgnoreComponentInstances();
84         }
85
86         
87         @Test
88         public void testSetIgnoreComponentInstances() throws Exception {
89                 ComponentParametersView testSubject;
90                 boolean ignoreComponentInstances = false;
91
92                 // default test
93                 testSubject = createTestSubject();
94                 testSubject.setIgnoreComponentInstances(ignoreComponentInstances);
95         }
96
97         
98         @Test
99         public void testIsIgnoreProperties() throws Exception {
100                 ComponentParametersView testSubject;
101                 boolean result;
102
103                 // default test
104                 testSubject = createTestSubject();
105                 result = testSubject.isIgnoreProperties();
106         }
107
108         
109         @Test
110         public void testSetIgnoreProperties() throws Exception {
111                 ComponentParametersView testSubject;
112                 boolean ignoreProperties = false;
113
114                 // default test
115                 testSubject = createTestSubject();
116                 testSubject.setIgnoreProperties(ignoreProperties);
117         }
118
119         
120         @Test
121         public void testIsIgnoreCapabilities() throws Exception {
122                 ComponentParametersView testSubject;
123                 boolean result;
124
125                 // default test
126                 testSubject = createTestSubject();
127                 result = testSubject.isIgnoreCapabilities();
128         }
129
130         
131         @Test
132         public void testSetIgnoreCapabilities() throws Exception {
133                 ComponentParametersView testSubject;
134                 boolean ignoreCapabilities = false;
135
136                 // default test
137                 testSubject = createTestSubject();
138                 testSubject.setIgnoreCapabilities(ignoreCapabilities);
139         }
140
141         
142         @Test
143         public void testIsIgnoreRequirements() throws Exception {
144                 ComponentParametersView testSubject;
145                 boolean result;
146
147                 // default test
148                 testSubject = createTestSubject();
149                 result = testSubject.isIgnoreRequirements();
150         }
151
152         
153         @Test
154         public void testSetIgnoreRequirements() throws Exception {
155                 ComponentParametersView testSubject;
156                 boolean ignoreRequirements = false;
157
158                 // default test
159                 testSubject = createTestSubject();
160                 testSubject.setIgnoreRequirements(ignoreRequirements);
161         }
162
163         
164         @Test
165         public void testIsIgnoreCategories() throws Exception {
166                 ComponentParametersView testSubject;
167                 boolean result;
168
169                 // default test
170                 testSubject = createTestSubject();
171                 result = testSubject.isIgnoreCategories();
172         }
173
174         
175         @Test
176         public void testSetIgnoreCategories() throws Exception {
177                 ComponentParametersView testSubject;
178                 boolean ignoreCategories = false;
179
180                 // default test
181                 testSubject = createTestSubject();
182                 testSubject.setIgnoreCategories(ignoreCategories);
183         }
184
185         
186         @Test
187         public void testIsIgnoreAllVersions() throws Exception {
188                 ComponentParametersView testSubject;
189                 boolean result;
190
191                 // default test
192                 testSubject = createTestSubject();
193                 result = testSubject.isIgnoreAllVersions();
194         }
195
196         
197         @Test
198         public void testSetIgnoreAllVersions() throws Exception {
199                 ComponentParametersView testSubject;
200                 boolean ignoreAllVersions = false;
201
202                 // default test
203                 testSubject = createTestSubject();
204                 testSubject.setIgnoreAllVersions(ignoreAllVersions);
205         }
206
207         
208         @Test
209         public void testIsIgnoreAdditionalInformation() throws Exception {
210                 ComponentParametersView testSubject;
211                 boolean result;
212
213                 // default test
214                 testSubject = createTestSubject();
215                 result = testSubject.isIgnoreAdditionalInformation();
216         }
217
218         
219         @Test
220         public void testIsIgnoreArtifacts() throws Exception {
221                 ComponentParametersView testSubject;
222                 boolean result;
223
224                 // default test
225                 testSubject = createTestSubject();
226                 result = testSubject.isIgnoreArtifacts();
227         }
228
229         
230         @Test
231         public void testSetIgnoreArtifacts() throws Exception {
232                 ComponentParametersView testSubject;
233                 boolean ignoreArtifacts = false;
234
235                 // default test
236                 testSubject = createTestSubject();
237                 testSubject.setIgnoreArtifacts(ignoreArtifacts);
238         }
239
240         
241         @Test
242         public void testIsIgnoreComponentInstancesProperties() throws Exception {
243                 ComponentParametersView testSubject;
244                 boolean result;
245
246                 // default test
247                 testSubject = createTestSubject();
248                 result = testSubject.isIgnoreComponentInstancesProperties();
249         }
250
251         
252         @Test
253         public void testSetIgnoreComponentInstancesProperties() throws Exception {
254                 ComponentParametersView testSubject;
255                 boolean ignoreComponentInstancesProperties = false;
256
257                 // default test
258                 testSubject = createTestSubject();
259                 testSubject.setIgnoreComponentInstancesProperties(ignoreComponentInstancesProperties);
260         }
261
262         
263         @Test
264         public void testIsIgnoreComponentInstancesInputs() throws Exception {
265                 ComponentParametersView testSubject;
266                 boolean result;
267
268                 // default test
269                 testSubject = createTestSubject();
270                 result = testSubject.isIgnoreComponentInstancesInputs();
271         }
272
273         
274         @Test
275         public void testSetIgnoreComponentInstancesInputs() throws Exception {
276                 ComponentParametersView testSubject;
277                 boolean ignoreComponentInstancesInputs = false;
278
279                 // default test
280                 testSubject = createTestSubject();
281                 testSubject.setIgnoreComponentInstancesInputs(ignoreComponentInstancesInputs);
282         }
283
284         
285         @Test
286         public void testIsIgnoreInterfaces() throws Exception {
287                 ComponentParametersView testSubject;
288                 boolean result;
289
290                 // default test
291                 testSubject = createTestSubject();
292                 result = testSubject.isIgnoreInterfaces();
293         }
294
295
296         
297         @Test
298         public void testIsIgnoreAttributesFrom() throws Exception {
299                 ComponentParametersView testSubject;
300                 boolean result;
301
302                 // default test
303                 testSubject = createTestSubject();
304                 result = testSubject.isIgnoreAttributesFrom();
305         }
306
307         
308         @Test
309         public void testSetIgnoreAttributesFrom() throws Exception {
310                 ComponentParametersView testSubject;
311                 boolean ignoreAttributesFrom = false;
312
313                 // default test
314                 testSubject = createTestSubject();
315                 testSubject.setIgnoreAttributesFrom(ignoreAttributesFrom);
316         }
317
318         
319         @Test
320         public void testIsIgnoreComponentInstancesAttributesFrom() throws Exception {
321                 ComponentParametersView testSubject;
322                 boolean result;
323
324                 // default test
325                 testSubject = createTestSubject();
326                 result = testSubject.isIgnoreComponentInstancesAttributesFrom();
327         }
328
329
330         
331         @Test
332         public void testIsIgnoreDerivedFrom() throws Exception {
333                 ComponentParametersView testSubject;
334                 boolean result;
335
336                 // default test
337                 testSubject = createTestSubject();
338                 result = testSubject.isIgnoreDerivedFrom();
339         }
340
341
342         
343         @Test
344         public void testIsIgnoreUsers() throws Exception {
345                 ComponentParametersView testSubject;
346                 boolean result;
347
348                 // default test
349                 testSubject = createTestSubject();
350                 result = testSubject.isIgnoreUsers();
351         }
352
353         
354         @Test
355         public void testSetIgnoreUsers() throws Exception {
356                 ComponentParametersView testSubject;
357                 boolean ignoreUsers = false;
358
359                 // default test
360                 testSubject = createTestSubject();
361                 testSubject.setIgnoreUsers(ignoreUsers);
362         }
363
364         
365         @Test
366         public void testIsIgnoreInputs() throws Exception {
367                 ComponentParametersView testSubject;
368                 boolean result;
369
370                 // default test
371                 testSubject = createTestSubject();
372                 result = testSubject.isIgnoreInputs();
373         }
374
375         
376         @Test
377         public void testSetIgnoreInputs() throws Exception {
378                 ComponentParametersView testSubject;
379                 boolean ignoreInputs = false;
380
381                 // default test
382                 testSubject = createTestSubject();
383                 testSubject.setIgnoreInputs(ignoreInputs);
384         }
385
386         
387         @Test
388         public void testIsIgnoreCapabiltyProperties() throws Exception {
389                 ComponentParametersView testSubject;
390                 boolean result;
391
392                 // default test
393                 testSubject = createTestSubject();
394                 result = testSubject.isIgnoreCapabiltyProperties();
395         }
396
397         
398         @Test
399         public void testSetIgnoreCapabiltyProperties() throws Exception {
400                 ComponentParametersView testSubject;
401                 boolean ignoreCapabiltyProperties = false;
402
403                 // default test
404                 testSubject = createTestSubject();
405                 testSubject.setIgnoreCapabiltyProperties(ignoreCapabiltyProperties);
406         }
407
408         
409         @Test
410         public void testIsIgnoreForwardingPath() throws Exception {
411                 ComponentParametersView testSubject;
412                 boolean result;
413
414                 // default test
415                 testSubject = createTestSubject();
416                 result = testSubject.isIgnoreForwardingPath();
417         }
418
419         
420         @Test
421         public void testSetIgnoreForwardingPath() throws Exception {
422                 ComponentParametersView testSubject;
423                 boolean ignoreServicePath = false;
424
425                 // default test
426                 testSubject = createTestSubject();
427                 testSubject.setIgnoreForwardingPath(ignoreServicePath);
428         }
429
430         
431         @Test
432         public void testIsIgnorePolicies() throws Exception {
433                 ComponentParametersView testSubject;
434                 boolean result;
435
436                 // default test
437                 testSubject = createTestSubject();
438                 result = testSubject.isIgnorePolicies();
439         }
440
441         
442         @Test
443         public void testSetIgnorePolicies() throws Exception {
444                 ComponentParametersView testSubject;
445                 boolean ignorePolicies = false;
446
447                 // default test
448                 testSubject = createTestSubject();
449                 testSubject.setIgnorePolicies(ignorePolicies);
450         }
451
452         
453         @Test
454         public void testIsIgnoreNodeFilterWithTrue() throws Exception {
455                 ComponentParametersView testSubject;
456
457                 testSubject = createTestSubject();
458                 testSubject.setIgnoreNodeFilter(true);
459                 assertSame(testSubject.isIgnoreNodeFilter(), true);
460         }
461
462         
463         @Test
464         public void testIsIgnoreNodeFilterWithFalse() throws Exception {
465                 ComponentParametersView testSubject;
466
467                 testSubject = createTestSubject();
468                 testSubject.setIgnoreNodeFilter(false);
469                 assertSame(testSubject.isIgnoreNodeFilter(), false);
470         }
471
472
473         @Test
474         public void testDetectParseFlag() throws Exception {
475                 ComponentParametersView testSubject;
476                 JsonParseFlagEnum result;
477
478                 // default test
479                 testSubject = createTestSubject();
480                 result = testSubject.detectParseFlag();
481         }
482 }