2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.sdc.be.config;
23 import org.junit.Test;
24 import org.openecomp.sdc.be.config.DistributionEngineConfiguration.ComponentArtifactTypesConfig;
25 import org.openecomp.sdc.be.config.DistributionEngineConfiguration.CreateTopicConfig;
26 import org.openecomp.sdc.be.config.DistributionEngineConfiguration.DistributionNotificationTopicConfig;
27 import org.openecomp.sdc.be.config.DistributionEngineConfiguration.DistributionStatusTopicConfig;
28 import org.openecomp.sdc.common.http.config.ExternalServiceConfig;
30 import java.util.List;
33 public class DistributionEngineConfigurationTest {
35 private DistributionEngineConfiguration createTestSubject() {
36 return new DistributionEngineConfiguration();
41 public void testGetUebServers() throws Exception {
42 DistributionEngineConfiguration testSubject;
46 testSubject = createTestSubject();
47 result = testSubject.getUebServers();
52 public void testSetUebServers() throws Exception {
53 DistributionEngineConfiguration testSubject;
54 List<String> uebServers = null;
57 testSubject = createTestSubject();
58 testSubject.setUebServers(uebServers);
63 public void testGetDistributionNotifTopicName() throws Exception {
64 DistributionEngineConfiguration testSubject;
68 testSubject = createTestSubject();
69 result = testSubject.getDistributionNotifTopicName();
74 public void testSetDistributionNotifTopicName() throws Exception {
75 DistributionEngineConfiguration testSubject;
76 String distributionNotifTopicName = "";
79 testSubject = createTestSubject();
80 testSubject.setDistributionNotifTopicName(distributionNotifTopicName);
85 public void testGetDistributionStatusTopicName() throws Exception {
86 DistributionEngineConfiguration testSubject;
90 testSubject = createTestSubject();
91 result = testSubject.getDistributionStatusTopicName();
96 public void testSetDistributionStatusTopicName() throws Exception {
97 DistributionEngineConfiguration testSubject;
98 String distributionStatusTopicName = "";
101 testSubject = createTestSubject();
102 testSubject.setDistributionStatusTopicName(distributionStatusTopicName);
107 public void testGetInitRetryIntervalSec() throws Exception {
108 DistributionEngineConfiguration testSubject;
112 testSubject = createTestSubject();
113 result = testSubject.getInitRetryIntervalSec();
118 public void testSetInitRetryIntervalSec() throws Exception {
119 DistributionEngineConfiguration testSubject;
120 Integer initRetryIntervalSec = 0;
123 testSubject = createTestSubject();
124 testSubject.setInitRetryIntervalSec(initRetryIntervalSec);
129 public void testGetDistribNotifServiceArtifactTypes() throws Exception {
130 DistributionEngineConfiguration testSubject;
131 ComponentArtifactTypesConfig result;
134 testSubject = createTestSubject();
135 result = testSubject.getDistribNotifServiceArtifactTypes();
140 public void testSetDistribNotifServiceArtifactTypes() throws Exception {
141 DistributionEngineConfiguration testSubject;
142 ComponentArtifactTypesConfig distribNotifServiceArtifactTypes = null;
145 testSubject = createTestSubject();
146 testSubject.setDistribNotifServiceArtifactTypes(distribNotifServiceArtifactTypes);
151 public void testGetDistribNotifResourceArtifactTypes() throws Exception {
152 DistributionEngineConfiguration testSubject;
153 ComponentArtifactTypesConfig result;
156 testSubject = createTestSubject();
157 result = testSubject.getDistribNotifResourceArtifactTypes();
162 public void testSetDistribNotifResourceArtifactTypes() throws Exception {
163 DistributionEngineConfiguration testSubject;
164 ComponentArtifactTypesConfig distribNotifResourceArtifactTypes = null;
167 testSubject = createTestSubject();
168 testSubject.setDistribNotifResourceArtifactTypes(distribNotifResourceArtifactTypes);
173 public void testGetUebPublicKey() throws Exception {
174 DistributionEngineConfiguration testSubject;
178 testSubject = createTestSubject();
179 result = testSubject.getUebPublicKey();
184 public void testSetUebPublicKey() throws Exception {
185 DistributionEngineConfiguration testSubject;
186 String uebPublicKey = "";
189 testSubject = createTestSubject();
190 testSubject.setUebPublicKey(uebPublicKey);
195 public void testGetUebSecretKey() throws Exception {
196 DistributionEngineConfiguration testSubject;
200 testSubject = createTestSubject();
201 result = testSubject.getUebSecretKey();
206 public void testSetUebSecretKey() throws Exception {
207 DistributionEngineConfiguration testSubject;
208 String uebSecretKey = "";
211 testSubject = createTestSubject();
212 testSubject.setUebSecretKey(uebSecretKey);
217 public void testGetEnvironments() throws Exception {
218 DistributionEngineConfiguration testSubject;
222 testSubject = createTestSubject();
223 result = testSubject.getEnvironments();
229 public void testSetEnvironments() throws Exception {
230 DistributionEngineConfiguration testSubject;
231 List<String> environments = null;
234 testSubject = createTestSubject();
236 testSubject.setEnvironments(environments);
241 public void testGetDistributionStatusTopic() throws Exception {
242 DistributionEngineConfiguration testSubject;
243 DistributionStatusTopicConfig result;
246 testSubject = createTestSubject();
247 result = testSubject.getDistributionStatusTopic();
252 public void testSetDistributionStatusTopic() throws Exception {
253 DistributionEngineConfiguration testSubject;
254 DistributionStatusTopicConfig distributionStatusTopic = null;
257 testSubject = createTestSubject();
258 testSubject.setDistributionStatusTopic(distributionStatusTopic);
263 public void testGetInitMaxIntervalSec() throws Exception {
264 DistributionEngineConfiguration testSubject;
268 testSubject = createTestSubject();
269 result = testSubject.getInitMaxIntervalSec();
274 public void testSetInitMaxIntervalSec() throws Exception {
275 DistributionEngineConfiguration testSubject;
276 Integer initMaxIntervalSec = 0;
279 testSubject = createTestSubject();
280 testSubject.setInitMaxIntervalSec(initMaxIntervalSec);
285 public void testGetCreateTopic() throws Exception {
286 DistributionEngineConfiguration testSubject;
287 CreateTopicConfig result;
290 testSubject = createTestSubject();
291 result = testSubject.getCreateTopic();
296 public void testSetCreateTopic() throws Exception {
297 DistributionEngineConfiguration testSubject;
298 CreateTopicConfig createTopic = null;
301 testSubject = createTestSubject();
302 testSubject.setCreateTopic(createTopic);
307 public void testIsStartDistributionEngine() throws Exception {
308 DistributionEngineConfiguration testSubject;
312 testSubject = createTestSubject();
313 result = testSubject.isStartDistributionEngine();
318 public void testSetStartDistributionEngine() throws Exception {
319 DistributionEngineConfiguration testSubject;
320 boolean startDistributionEngine = false;
323 testSubject = createTestSubject();
324 testSubject.setStartDistributionEngine(startDistributionEngine);
329 public void testGetDistributionNotificationTopic() throws Exception {
330 DistributionEngineConfiguration testSubject;
331 DistributionNotificationTopicConfig result;
334 testSubject = createTestSubject();
335 result = testSubject.getDistributionNotificationTopic();
340 public void testSetDistributionNotificationTopic() throws Exception {
341 DistributionEngineConfiguration testSubject;
342 DistributionNotificationTopicConfig distributionNotificationTopic = null;
345 testSubject = createTestSubject();
346 testSubject.setDistributionNotificationTopic(distributionNotificationTopic);
351 public void testGetDefaultArtifactInstallationTimeout() throws Exception {
352 DistributionEngineConfiguration testSubject;
356 testSubject = createTestSubject();
357 result = testSubject.getDefaultArtifactInstallationTimeout();
362 public void testSetDefaultArtifactInstallationTimeout() throws Exception {
363 DistributionEngineConfiguration testSubject;
364 int defaultArtifactInstallationTimeout = 0;
367 testSubject = createTestSubject();
368 testSubject.setDefaultArtifactInstallationTimeout(defaultArtifactInstallationTimeout);
373 public void testIsUseHttpsWithDmaap() throws Exception {
374 DistributionEngineConfiguration testSubject;
378 testSubject = createTestSubject();
379 result = testSubject.isUseHttpsWithDmaap();
384 public void testSetUseHttpsWithDmaap() throws Exception {
385 DistributionEngineConfiguration testSubject;
386 boolean useHttpsWithDmaap = false;
389 testSubject = createTestSubject();
390 testSubject.setUseHttpsWithDmaap(useHttpsWithDmaap);
396 public void testGetAaiConfig() throws Exception {
397 DistributionEngineConfiguration testSubject;ExternalServiceConfig result;
400 testSubject=createTestSubject();result=testSubject.getAaiConfig();
406 public void testGetAllowedTimeBeforeStaleSec() throws Exception {
407 DistributionEngineConfiguration testSubject;Integer result;
410 testSubject=createTestSubject();result=testSubject.getAllowedTimeBeforeStaleSec();
416 public void testGetCurrentArtifactInstallationTimeout() throws Exception {
417 DistributionEngineConfiguration testSubject;int result;
420 testSubject=createTestSubject();result=testSubject.getCurrentArtifactInstallationTimeout();
426 public void testGetCurrentArtifactInstallationTimeout_1() throws Exception {
427 DistributionEngineConfiguration testSubject;int result;
430 testSubject=createTestSubject();result=testSubject.getCurrentArtifactInstallationTimeout();
436 public void testSetCurrentArtifactInstallationTimeout() throws Exception {
437 DistributionEngineConfiguration testSubject;int currentArtifactInstallationTimeout = 0;
441 testSubject=createTestSubject();testSubject.setCurrentArtifactInstallationTimeout(currentArtifactInstallationTimeout);
447 public void testGetOpEnvRecoveryIntervalSec() throws Exception {
448 DistributionEngineConfiguration testSubject;Integer result;
451 testSubject=createTestSubject();result=testSubject.getOpEnvRecoveryIntervalSec();
457 public void testSetOpEnvRecoveryIntervalSec() throws Exception {
458 DistributionEngineConfiguration testSubject;Integer opEnvRecoveryIntervalSec = 0;
462 testSubject=createTestSubject();testSubject.setOpEnvRecoveryIntervalSec(opEnvRecoveryIntervalSec);
468 public void testGetAllowedTimeBeforeStaleSec_1() throws Exception {
469 DistributionEngineConfiguration testSubject;Integer result;
472 testSubject=createTestSubject();result=testSubject.getAllowedTimeBeforeStaleSec();
478 public void testSetAllowedTimeBeforeStaleSec() throws Exception {
479 DistributionEngineConfiguration testSubject;Integer allowedTimeBeforeStaleSec = 0;
483 testSubject=createTestSubject();testSubject.setAllowedTimeBeforeStaleSec(allowedTimeBeforeStaleSec);
489 public void testGetAaiConfig_1() throws Exception {
490 DistributionEngineConfiguration testSubject;ExternalServiceConfig result;
493 testSubject=createTestSubject();result=testSubject.getAaiConfig();
499 public void testSetAaiConfig() throws Exception {
500 DistributionEngineConfiguration testSubject;ExternalServiceConfig aaiConfig = null;
504 testSubject=createTestSubject();testSubject.setAaiConfig(aaiConfig);
510 public void testGetMsoConfig() throws Exception {
511 DistributionEngineConfiguration testSubject;ExternalServiceConfig result;
514 testSubject=createTestSubject();result=testSubject.getMsoConfig();
520 public void testSetMsoConfig() throws Exception {
521 DistributionEngineConfiguration testSubject;ExternalServiceConfig msoConfig = null;
525 testSubject=createTestSubject();testSubject.setMsoConfig(msoConfig);
528 private ComponentArtifactTypesConfig createTestSubject2() {
529 return new DistributionEngineConfiguration.ComponentArtifactTypesConfig();
534 public void testGetInfo() throws Exception {
535 ComponentArtifactTypesConfig testSubject;
539 testSubject = createTestSubject2();
540 result = testSubject.getInfo();
545 public void testSetInfo() throws Exception {
546 ComponentArtifactTypesConfig testSubject;
547 List<String> info = null;
550 testSubject = createTestSubject2();
551 testSubject.setInfo(info);
556 public void testGetLifecycle() throws Exception {
557 ComponentArtifactTypesConfig testSubject;
561 testSubject = createTestSubject2();
562 result = testSubject.getLifecycle();
567 public void testSetLifecycle() throws Exception {
568 ComponentArtifactTypesConfig testSubject;
569 List<String> lifecycle = null;
572 testSubject = createTestSubject2();
573 testSubject.setLifecycle(lifecycle);
578 public void testToString() throws Exception {
579 ComponentArtifactTypesConfig testSubject;
583 testSubject = createTestSubject2();
584 result = testSubject.toString();