1 package org.openecomp.sdc.be.config;
4 import org.openecomp.sdc.be.config.DistributionEngineConfiguration.ComponentArtifactTypesConfig;
5 import org.openecomp.sdc.be.config.DistributionEngineConfiguration.CreateTopicConfig;
6 import org.openecomp.sdc.be.config.DistributionEngineConfiguration.DistributionNotificationTopicConfig;
7 import org.openecomp.sdc.be.config.DistributionEngineConfiguration.DistributionStatusTopicConfig;
8 import org.openecomp.sdc.common.http.config.ExternalServiceConfig;
10 import java.util.List;
13 public class DistributionEngineConfigurationTest {
15 private DistributionEngineConfiguration createTestSubject() {
16 return new DistributionEngineConfiguration();
21 public void testGetUebServers() throws Exception {
22 DistributionEngineConfiguration testSubject;
26 testSubject = createTestSubject();
27 result = testSubject.getUebServers();
32 public void testSetUebServers() throws Exception {
33 DistributionEngineConfiguration testSubject;
34 List<String> uebServers = null;
37 testSubject = createTestSubject();
38 testSubject.setUebServers(uebServers);
43 public void testGetDistributionNotifTopicName() throws Exception {
44 DistributionEngineConfiguration testSubject;
48 testSubject = createTestSubject();
49 result = testSubject.getDistributionNotifTopicName();
54 public void testSetDistributionNotifTopicName() throws Exception {
55 DistributionEngineConfiguration testSubject;
56 String distributionNotifTopicName = "";
59 testSubject = createTestSubject();
60 testSubject.setDistributionNotifTopicName(distributionNotifTopicName);
65 public void testGetDistributionStatusTopicName() throws Exception {
66 DistributionEngineConfiguration testSubject;
70 testSubject = createTestSubject();
71 result = testSubject.getDistributionStatusTopicName();
76 public void testSetDistributionStatusTopicName() throws Exception {
77 DistributionEngineConfiguration testSubject;
78 String distributionStatusTopicName = "";
81 testSubject = createTestSubject();
82 testSubject.setDistributionStatusTopicName(distributionStatusTopicName);
87 public void testGetInitRetryIntervalSec() throws Exception {
88 DistributionEngineConfiguration testSubject;
92 testSubject = createTestSubject();
93 result = testSubject.getInitRetryIntervalSec();
98 public void testSetInitRetryIntervalSec() throws Exception {
99 DistributionEngineConfiguration testSubject;
100 Integer initRetryIntervalSec = 0;
103 testSubject = createTestSubject();
104 testSubject.setInitRetryIntervalSec(initRetryIntervalSec);
109 public void testGetDistribNotifServiceArtifactTypes() throws Exception {
110 DistributionEngineConfiguration testSubject;
111 ComponentArtifactTypesConfig result;
114 testSubject = createTestSubject();
115 result = testSubject.getDistribNotifServiceArtifactTypes();
120 public void testSetDistribNotifServiceArtifactTypes() throws Exception {
121 DistributionEngineConfiguration testSubject;
122 ComponentArtifactTypesConfig distribNotifServiceArtifactTypes = null;
125 testSubject = createTestSubject();
126 testSubject.setDistribNotifServiceArtifactTypes(distribNotifServiceArtifactTypes);
131 public void testGetDistribNotifResourceArtifactTypes() throws Exception {
132 DistributionEngineConfiguration testSubject;
133 ComponentArtifactTypesConfig result;
136 testSubject = createTestSubject();
137 result = testSubject.getDistribNotifResourceArtifactTypes();
142 public void testSetDistribNotifResourceArtifactTypes() throws Exception {
143 DistributionEngineConfiguration testSubject;
144 ComponentArtifactTypesConfig distribNotifResourceArtifactTypes = null;
147 testSubject = createTestSubject();
148 testSubject.setDistribNotifResourceArtifactTypes(distribNotifResourceArtifactTypes);
153 public void testGetUebPublicKey() throws Exception {
154 DistributionEngineConfiguration testSubject;
158 testSubject = createTestSubject();
159 result = testSubject.getUebPublicKey();
164 public void testSetUebPublicKey() throws Exception {
165 DistributionEngineConfiguration testSubject;
166 String uebPublicKey = "";
169 testSubject = createTestSubject();
170 testSubject.setUebPublicKey(uebPublicKey);
175 public void testGetUebSecretKey() throws Exception {
176 DistributionEngineConfiguration testSubject;
180 testSubject = createTestSubject();
181 result = testSubject.getUebSecretKey();
186 public void testSetUebSecretKey() throws Exception {
187 DistributionEngineConfiguration testSubject;
188 String uebSecretKey = "";
191 testSubject = createTestSubject();
192 testSubject.setUebSecretKey(uebSecretKey);
197 public void testGetEnvironments() throws Exception {
198 DistributionEngineConfiguration testSubject;
202 testSubject = createTestSubject();
203 result = testSubject.getEnvironments();
209 public void testSetEnvironments() throws Exception {
210 DistributionEngineConfiguration testSubject;
211 List<String> environments = null;
214 testSubject = createTestSubject();
216 testSubject.setEnvironments(environments);
221 public void testGetDistributionStatusTopic() throws Exception {
222 DistributionEngineConfiguration testSubject;
223 DistributionStatusTopicConfig result;
226 testSubject = createTestSubject();
227 result = testSubject.getDistributionStatusTopic();
232 public void testSetDistributionStatusTopic() throws Exception {
233 DistributionEngineConfiguration testSubject;
234 DistributionStatusTopicConfig distributionStatusTopic = null;
237 testSubject = createTestSubject();
238 testSubject.setDistributionStatusTopic(distributionStatusTopic);
243 public void testGetInitMaxIntervalSec() throws Exception {
244 DistributionEngineConfiguration testSubject;
248 testSubject = createTestSubject();
249 result = testSubject.getInitMaxIntervalSec();
254 public void testSetInitMaxIntervalSec() throws Exception {
255 DistributionEngineConfiguration testSubject;
256 Integer initMaxIntervalSec = 0;
259 testSubject = createTestSubject();
260 testSubject.setInitMaxIntervalSec(initMaxIntervalSec);
265 public void testGetCreateTopic() throws Exception {
266 DistributionEngineConfiguration testSubject;
267 CreateTopicConfig result;
270 testSubject = createTestSubject();
271 result = testSubject.getCreateTopic();
276 public void testSetCreateTopic() throws Exception {
277 DistributionEngineConfiguration testSubject;
278 CreateTopicConfig createTopic = null;
281 testSubject = createTestSubject();
282 testSubject.setCreateTopic(createTopic);
287 public void testIsStartDistributionEngine() throws Exception {
288 DistributionEngineConfiguration testSubject;
292 testSubject = createTestSubject();
293 result = testSubject.isStartDistributionEngine();
298 public void testSetStartDistributionEngine() throws Exception {
299 DistributionEngineConfiguration testSubject;
300 boolean startDistributionEngine = false;
303 testSubject = createTestSubject();
304 testSubject.setStartDistributionEngine(startDistributionEngine);
309 public void testGetDistributionNotificationTopic() throws Exception {
310 DistributionEngineConfiguration testSubject;
311 DistributionNotificationTopicConfig result;
314 testSubject = createTestSubject();
315 result = testSubject.getDistributionNotificationTopic();
320 public void testSetDistributionNotificationTopic() throws Exception {
321 DistributionEngineConfiguration testSubject;
322 DistributionNotificationTopicConfig distributionNotificationTopic = null;
325 testSubject = createTestSubject();
326 testSubject.setDistributionNotificationTopic(distributionNotificationTopic);
331 public void testGetDefaultArtifactInstallationTimeout() throws Exception {
332 DistributionEngineConfiguration testSubject;
336 testSubject = createTestSubject();
337 result = testSubject.getDefaultArtifactInstallationTimeout();
342 public void testSetDefaultArtifactInstallationTimeout() throws Exception {
343 DistributionEngineConfiguration testSubject;
344 int defaultArtifactInstallationTimeout = 0;
347 testSubject = createTestSubject();
348 testSubject.setDefaultArtifactInstallationTimeout(defaultArtifactInstallationTimeout);
353 public void testIsUseHttpsWithDmaap() throws Exception {
354 DistributionEngineConfiguration testSubject;
358 testSubject = createTestSubject();
359 result = testSubject.isUseHttpsWithDmaap();
364 public void testSetUseHttpsWithDmaap() throws Exception {
365 DistributionEngineConfiguration testSubject;
366 boolean useHttpsWithDmaap = false;
369 testSubject = createTestSubject();
370 testSubject.setUseHttpsWithDmaap(useHttpsWithDmaap);
376 public void testGetAaiConfig() throws Exception {
377 DistributionEngineConfiguration testSubject;ExternalServiceConfig result;
380 testSubject=createTestSubject();result=testSubject.getAaiConfig();
386 public void testGetAllowedTimeBeforeStaleSec() throws Exception {
387 DistributionEngineConfiguration testSubject;Integer result;
390 testSubject=createTestSubject();result=testSubject.getAllowedTimeBeforeStaleSec();
396 public void testGetCurrentArtifactInstallationTimeout() throws Exception {
397 DistributionEngineConfiguration testSubject;int result;
400 testSubject=createTestSubject();result=testSubject.getCurrentArtifactInstallationTimeout();
406 public void testGetCurrentArtifactInstallationTimeout_1() throws Exception {
407 DistributionEngineConfiguration testSubject;int result;
410 testSubject=createTestSubject();result=testSubject.getCurrentArtifactInstallationTimeout();
416 public void testSetCurrentArtifactInstallationTimeout() throws Exception {
417 DistributionEngineConfiguration testSubject;int currentArtifactInstallationTimeout = 0;
421 testSubject=createTestSubject();testSubject.setCurrentArtifactInstallationTimeout(currentArtifactInstallationTimeout);
427 public void testGetOpEnvRecoveryIntervalSec() throws Exception {
428 DistributionEngineConfiguration testSubject;Integer result;
431 testSubject=createTestSubject();result=testSubject.getOpEnvRecoveryIntervalSec();
437 public void testSetOpEnvRecoveryIntervalSec() throws Exception {
438 DistributionEngineConfiguration testSubject;Integer opEnvRecoveryIntervalSec = 0;
442 testSubject=createTestSubject();testSubject.setOpEnvRecoveryIntervalSec(opEnvRecoveryIntervalSec);
448 public void testGetAllowedTimeBeforeStaleSec_1() throws Exception {
449 DistributionEngineConfiguration testSubject;Integer result;
452 testSubject=createTestSubject();result=testSubject.getAllowedTimeBeforeStaleSec();
458 public void testSetAllowedTimeBeforeStaleSec() throws Exception {
459 DistributionEngineConfiguration testSubject;Integer allowedTimeBeforeStaleSec = 0;
463 testSubject=createTestSubject();testSubject.setAllowedTimeBeforeStaleSec(allowedTimeBeforeStaleSec);
469 public void testGetAaiConfig_1() throws Exception {
470 DistributionEngineConfiguration testSubject;ExternalServiceConfig result;
473 testSubject=createTestSubject();result=testSubject.getAaiConfig();
479 public void testSetAaiConfig() throws Exception {
480 DistributionEngineConfiguration testSubject;ExternalServiceConfig aaiConfig = null;
484 testSubject=createTestSubject();testSubject.setAaiConfig(aaiConfig);
490 public void testGetMsoConfig() throws Exception {
491 DistributionEngineConfiguration testSubject;ExternalServiceConfig result;
494 testSubject=createTestSubject();result=testSubject.getMsoConfig();
500 public void testSetMsoConfig() throws Exception {
501 DistributionEngineConfiguration testSubject;ExternalServiceConfig msoConfig = null;
505 testSubject=createTestSubject();testSubject.setMsoConfig(msoConfig);
508 private ComponentArtifactTypesConfig createTestSubject2() {
509 return new DistributionEngineConfiguration.ComponentArtifactTypesConfig();
514 public void testGetInfo() throws Exception {
515 ComponentArtifactTypesConfig testSubject;
519 testSubject = createTestSubject2();
520 result = testSubject.getInfo();
525 public void testSetInfo() throws Exception {
526 ComponentArtifactTypesConfig testSubject;
527 List<String> info = null;
530 testSubject = createTestSubject2();
531 testSubject.setInfo(info);
536 public void testGetLifecycle() throws Exception {
537 ComponentArtifactTypesConfig testSubject;
541 testSubject = createTestSubject2();
542 result = testSubject.getLifecycle();
547 public void testSetLifecycle() throws Exception {
548 ComponentArtifactTypesConfig testSubject;
549 List<String> lifecycle = null;
552 testSubject = createTestSubject2();
553 testSubject.setLifecycle(lifecycle);
558 public void testToString() throws Exception {
559 ComponentArtifactTypesConfig testSubject;
563 testSubject = createTestSubject2();
564 result = testSubject.toString();