1 package org.openecomp.sdc.be.model;
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;
8 import java.util.LinkedList;
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 testIsIgnoreArtifacts() throws Exception {
219 ComponentParametersView testSubject;
223 testSubject = createTestSubject();
224 result = testSubject.isIgnoreArtifacts();
229 public void testSetIgnoreArtifacts() throws Exception {
230 ComponentParametersView testSubject;
231 boolean ignoreArtifacts = false;
234 testSubject = createTestSubject();
235 testSubject.setIgnoreArtifacts(ignoreArtifacts);
240 public void testIsIgnoreComponentInstancesProperties() throws Exception {
241 ComponentParametersView testSubject;
245 testSubject = createTestSubject();
246 result = testSubject.isIgnoreComponentInstancesProperties();
251 public void testSetIgnoreComponentInstancesProperties() throws Exception {
252 ComponentParametersView testSubject;
253 boolean ignoreComponentInstancesProperties = false;
256 testSubject = createTestSubject();
257 testSubject.setIgnoreComponentInstancesProperties(ignoreComponentInstancesProperties);
262 public void testIsIgnoreComponentInstancesInputs() throws Exception {
263 ComponentParametersView testSubject;
267 testSubject = createTestSubject();
268 result = testSubject.isIgnoreComponentInstancesInputs();
273 public void testSetIgnoreComponentInstancesInputs() throws Exception {
274 ComponentParametersView testSubject;
275 boolean ignoreComponentInstancesInputs = false;
278 testSubject = createTestSubject();
279 testSubject.setIgnoreComponentInstancesInputs(ignoreComponentInstancesInputs);
284 public void testIsIgnoreInterfaces() throws Exception {
285 ComponentParametersView testSubject;
289 testSubject = createTestSubject();
290 result = testSubject.isIgnoreInterfaces();
296 public void testIsIgnoreAttributesFrom() throws Exception {
297 ComponentParametersView testSubject;
301 testSubject = createTestSubject();
302 result = testSubject.isIgnoreAttributesFrom();
307 public void testSetIgnoreAttributesFrom() throws Exception {
308 ComponentParametersView testSubject;
309 boolean ignoreAttributesFrom = false;
312 testSubject = createTestSubject();
313 testSubject.setIgnoreAttributesFrom(ignoreAttributesFrom);
318 public void testIsIgnoreComponentInstancesAttributesFrom() throws Exception {
319 ComponentParametersView testSubject;
323 testSubject = createTestSubject();
324 result = testSubject.isIgnoreComponentInstancesAttributesFrom();
330 public void testIsIgnoreDerivedFrom() throws Exception {
331 ComponentParametersView testSubject;
335 testSubject = createTestSubject();
336 result = testSubject.isIgnoreDerivedFrom();
342 public void testIsIgnoreUsers() throws Exception {
343 ComponentParametersView testSubject;
347 testSubject = createTestSubject();
348 result = testSubject.isIgnoreUsers();
353 public void testSetIgnoreUsers() throws Exception {
354 ComponentParametersView testSubject;
355 boolean ignoreUsers = false;
358 testSubject = createTestSubject();
359 testSubject.setIgnoreUsers(ignoreUsers);
364 public void testIsIgnoreInputs() throws Exception {
365 ComponentParametersView testSubject;
369 testSubject = createTestSubject();
370 result = testSubject.isIgnoreInputs();
375 public void testSetIgnoreInputs() throws Exception {
376 ComponentParametersView testSubject;
377 boolean ignoreInputs = false;
380 testSubject = createTestSubject();
381 testSubject.setIgnoreInputs(ignoreInputs);
386 public void testIsIgnoreCapabiltyProperties() throws Exception {
387 ComponentParametersView testSubject;
391 testSubject = createTestSubject();
392 result = testSubject.isIgnoreCapabiltyProperties();
397 public void testSetIgnoreCapabiltyProperties() throws Exception {
398 ComponentParametersView testSubject;
399 boolean ignoreCapabiltyProperties = false;
402 testSubject = createTestSubject();
403 testSubject.setIgnoreCapabiltyProperties(ignoreCapabiltyProperties);
408 public void testIsIgnoreForwardingPath() throws Exception {
409 ComponentParametersView testSubject;
413 testSubject = createTestSubject();
414 result = testSubject.isIgnoreForwardingPath();
419 public void testSetIgnoreForwardingPath() throws Exception {
420 ComponentParametersView testSubject;
421 boolean ignoreServicePath = false;
424 testSubject = createTestSubject();
425 testSubject.setIgnoreForwardingPath(ignoreServicePath);
430 public void testIsIgnorePolicies() throws Exception {
431 ComponentParametersView testSubject;
435 testSubject = createTestSubject();
436 result = testSubject.isIgnorePolicies();
441 public void testSetIgnorePolicies() throws Exception {
442 ComponentParametersView testSubject;
443 boolean ignorePolicies = false;
446 testSubject = createTestSubject();
447 testSubject.setIgnorePolicies(ignorePolicies);
452 public void testDetectParseFlag() throws Exception {
453 ComponentParametersView testSubject;
454 JsonParseFlagEnum result;
457 testSubject = createTestSubject();
458 result = testSubject.detectParseFlag();