1 package org.openecomp.sdc.be.model;
3 import java.util.LinkedList;
6 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
7 import org.openecomp.sdc.be.datatypes.enums.ComponentFieldsEnum;
8 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
10 public class ComponentParametersViewTest {
12 private ComponentParametersView createTestSubject() {
13 return new ComponentParametersView();
17 public void testCtor() throws Exception {
18 new ComponentParametersView(true);
20 LinkedList<String> linkedList = new LinkedList<>();
21 for (ComponentFieldsEnum iterable_element : ComponentFieldsEnum.values()) {
22 linkedList.add(iterable_element.getValue());
24 new ComponentParametersView(linkedList);
28 public void testFilter() throws Exception {
29 ComponentParametersView testSubject;
30 Component component = null;
31 ComponentTypeEnum componentType = ComponentTypeEnum.RESOURCE;
35 testSubject = createTestSubject();
36 result = testSubject.filter(component, componentType);
37 testSubject.disableAll();
38 result = testSubject.filter(new Resource(), componentType);
43 public void testDisableAll() throws Exception {
44 ComponentParametersView testSubject;
47 testSubject = createTestSubject();
48 testSubject.disableAll();
53 public void testIsIgnoreGroups() throws Exception {
54 ComponentParametersView testSubject;
58 testSubject = createTestSubject();
59 result = testSubject.isIgnoreGroups();
64 public void testSetIgnoreGroups() throws Exception {
65 ComponentParametersView testSubject;
66 boolean ignoreGroups = false;
69 testSubject = createTestSubject();
70 testSubject.setIgnoreGroups(ignoreGroups);
75 public void testIsIgnoreComponentInstances() throws Exception {
76 ComponentParametersView testSubject;
80 testSubject = createTestSubject();
81 result = testSubject.isIgnoreComponentInstances();
86 public void testSetIgnoreComponentInstances() throws Exception {
87 ComponentParametersView testSubject;
88 boolean ignoreComponentInstances = false;
91 testSubject = createTestSubject();
92 testSubject.setIgnoreComponentInstances(ignoreComponentInstances);
97 public void testIsIgnoreProperties() throws Exception {
98 ComponentParametersView testSubject;
102 testSubject = createTestSubject();
103 result = testSubject.isIgnoreProperties();
108 public void testSetIgnoreProperties() throws Exception {
109 ComponentParametersView testSubject;
110 boolean ignoreProperties = false;
113 testSubject = createTestSubject();
114 testSubject.setIgnoreProperties(ignoreProperties);
119 public void testIsIgnoreCapabilities() throws Exception {
120 ComponentParametersView testSubject;
124 testSubject = createTestSubject();
125 result = testSubject.isIgnoreCapabilities();
130 public void testSetIgnoreCapabilities() throws Exception {
131 ComponentParametersView testSubject;
132 boolean ignoreCapabilities = false;
135 testSubject = createTestSubject();
136 testSubject.setIgnoreCapabilities(ignoreCapabilities);
141 public void testIsIgnoreRequirements() throws Exception {
142 ComponentParametersView testSubject;
146 testSubject = createTestSubject();
147 result = testSubject.isIgnoreRequirements();
152 public void testSetIgnoreRequirements() throws Exception {
153 ComponentParametersView testSubject;
154 boolean ignoreRequirements = false;
157 testSubject = createTestSubject();
158 testSubject.setIgnoreRequirements(ignoreRequirements);
163 public void testIsIgnoreCategories() throws Exception {
164 ComponentParametersView testSubject;
168 testSubject = createTestSubject();
169 result = testSubject.isIgnoreCategories();
174 public void testSetIgnoreCategories() throws Exception {
175 ComponentParametersView testSubject;
176 boolean ignoreCategories = false;
179 testSubject = createTestSubject();
180 testSubject.setIgnoreCategories(ignoreCategories);
185 public void testIsIgnoreAllVersions() throws Exception {
186 ComponentParametersView testSubject;
190 testSubject = createTestSubject();
191 result = testSubject.isIgnoreAllVersions();
196 public void testSetIgnoreAllVersions() throws Exception {
197 ComponentParametersView testSubject;
198 boolean ignoreAllVersions = false;
201 testSubject = createTestSubject();
202 testSubject.setIgnoreAllVersions(ignoreAllVersions);
207 public void testIsIgnoreAdditionalInformation() throws Exception {
208 ComponentParametersView testSubject;
212 testSubject = createTestSubject();
213 result = testSubject.isIgnoreAdditionalInformation();
218 public void testSetIgnoreAdditionalInformation() throws Exception {
219 ComponentParametersView testSubject;
220 boolean ignoreAdditionalInformation = false;
223 testSubject = createTestSubject();
224 testSubject.setIgnoreAdditionalInformation(ignoreAdditionalInformation);
229 public void testIsIgnoreArtifacts() throws Exception {
230 ComponentParametersView testSubject;
234 testSubject = createTestSubject();
235 result = testSubject.isIgnoreArtifacts();
240 public void testSetIgnoreArtifacts() throws Exception {
241 ComponentParametersView testSubject;
242 boolean ignoreArtifacts = false;
245 testSubject = createTestSubject();
246 testSubject.setIgnoreArtifacts(ignoreArtifacts);
251 public void testIsIgnoreComponentInstancesProperties() throws Exception {
252 ComponentParametersView testSubject;
256 testSubject = createTestSubject();
257 result = testSubject.isIgnoreComponentInstancesProperties();
262 public void testSetIgnoreComponentInstancesProperties() throws Exception {
263 ComponentParametersView testSubject;
264 boolean ignoreComponentInstancesProperties = false;
267 testSubject = createTestSubject();
268 testSubject.setIgnoreComponentInstancesProperties(ignoreComponentInstancesProperties);
273 public void testIsIgnoreComponentInstancesInputs() throws Exception {
274 ComponentParametersView testSubject;
278 testSubject = createTestSubject();
279 result = testSubject.isIgnoreComponentInstancesInputs();
284 public void testSetIgnoreComponentInstancesInputs() throws Exception {
285 ComponentParametersView testSubject;
286 boolean ignoreComponentInstancesInputs = false;
289 testSubject = createTestSubject();
290 testSubject.setIgnoreComponentInstancesInputs(ignoreComponentInstancesInputs);
295 public void testIsIgnoreInterfaces() throws Exception {
296 ComponentParametersView testSubject;
300 testSubject = createTestSubject();
301 result = testSubject.isIgnoreInterfaces();
306 public void testSetIgnoreInterfaces() throws Exception {
307 ComponentParametersView testSubject;
308 boolean ignoreInterfaces = false;
311 testSubject = createTestSubject();
312 testSubject.setIgnoreInterfaces(ignoreInterfaces);
317 public void testIsIgnoreAttributesFrom() throws Exception {
318 ComponentParametersView testSubject;
322 testSubject = createTestSubject();
323 result = testSubject.isIgnoreAttributesFrom();
328 public void testSetIgnoreAttributesFrom() throws Exception {
329 ComponentParametersView testSubject;
330 boolean ignoreAttributesFrom = false;
333 testSubject = createTestSubject();
334 testSubject.setIgnoreAttributesFrom(ignoreAttributesFrom);
339 public void testIsIgnoreComponentInstancesAttributesFrom() throws Exception {
340 ComponentParametersView testSubject;
344 testSubject = createTestSubject();
345 result = testSubject.isIgnoreComponentInstancesAttributesFrom();
350 public void testSetIgnoreComponentInstancesAttributesFrom() throws Exception {
351 ComponentParametersView testSubject;
352 boolean ignoreComponentInstancesAttributesFrom = false;
355 testSubject = createTestSubject();
356 testSubject.setIgnoreComponentInstancesAttributesFrom(ignoreComponentInstancesAttributesFrom);
361 public void testIsIgnoreDerivedFrom() throws Exception {
362 ComponentParametersView testSubject;
366 testSubject = createTestSubject();
367 result = testSubject.isIgnoreDerivedFrom();
372 public void testSetIgnoreDerivedFrom() throws Exception {
373 ComponentParametersView testSubject;
374 boolean ignoreDerivedFrom = false;
377 testSubject = createTestSubject();
378 testSubject.setIgnoreDerivedFrom(ignoreDerivedFrom);
383 public void testIsIgnoreUsers() throws Exception {
384 ComponentParametersView testSubject;
388 testSubject = createTestSubject();
389 result = testSubject.isIgnoreUsers();
394 public void testSetIgnoreUsers() throws Exception {
395 ComponentParametersView testSubject;
396 boolean ignoreUsers = false;
399 testSubject = createTestSubject();
400 testSubject.setIgnoreUsers(ignoreUsers);
405 public void testIsIgnoreInputs() throws Exception {
406 ComponentParametersView testSubject;
410 testSubject = createTestSubject();
411 result = testSubject.isIgnoreInputs();
416 public void testSetIgnoreInputs() throws Exception {
417 ComponentParametersView testSubject;
418 boolean ignoreInputs = false;
421 testSubject = createTestSubject();
422 testSubject.setIgnoreInputs(ignoreInputs);
427 public void testIsIgnoreCapabiltyProperties() throws Exception {
428 ComponentParametersView testSubject;
432 testSubject = createTestSubject();
433 result = testSubject.isIgnoreCapabiltyProperties();
438 public void testSetIgnoreCapabiltyProperties() throws Exception {
439 ComponentParametersView testSubject;
440 boolean ignoreCapabiltyProperties = false;
443 testSubject = createTestSubject();
444 testSubject.setIgnoreCapabiltyProperties(ignoreCapabiltyProperties);
449 public void testIsIgnoreForwardingPath() throws Exception {
450 ComponentParametersView testSubject;
454 testSubject = createTestSubject();
455 result = testSubject.isIgnoreForwardingPath();
460 public void testSetIgnoreForwardingPath() throws Exception {
461 ComponentParametersView testSubject;
462 boolean ignoreServicePath = false;
465 testSubject = createTestSubject();
466 testSubject.setIgnoreForwardingPath(ignoreServicePath);
471 public void testIsIgnorePolicies() throws Exception {
472 ComponentParametersView testSubject;
476 testSubject = createTestSubject();
477 result = testSubject.isIgnorePolicies();
482 public void testSetIgnorePolicies() throws Exception {
483 ComponentParametersView testSubject;
484 boolean ignorePolicies = false;
487 testSubject = createTestSubject();
488 testSubject.setIgnorePolicies(ignorePolicies);
493 public void testDetectParseFlag() throws Exception {
494 ComponentParametersView testSubject;
495 JsonParseFlagEnum result;
498 testSubject = createTestSubject();
499 result = testSubject.detectParseFlag();