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