diff options
author | xuegao <xue.gao@intl.att.com> | 2021-03-11 17:22:46 +0100 |
---|---|---|
committer | Vasyl Razinkov <vasyl.razinkov@est.tech> | 2021-03-12 11:51:04 +0000 |
commit | f54b124ccfcf596e19d19ba2d24fd2702cd73c8d (patch) | |
tree | ed47a30a4fa8e56d12339af900640e1afd853dd6 /common-app-api/src/main | |
parent | 74d32db7741c0ab183296acdf6c79b345b39b4ca (diff) |
Adding unit tests
Adding unit tests to improve test coverage.
Issue-ID: SDC-3428
Signed-off-by: xuegao <xue.gao@intl.att.com>
Change-Id: I57da2ff92839cb78985e5f3d3c13dc575c1b6c17
Diffstat (limited to 'common-app-api/src/main')
3 files changed, 32 insertions, 431 deletions
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/be/config/CadiFilterParams.java b/common-app-api/src/main/java/org/openecomp/sdc/be/config/CadiFilterParams.java index 39793fb2cd..b82983e0bc 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/be/config/CadiFilterParams.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/be/config/CadiFilterParams.java @@ -1,5 +1,10 @@ package org.openecomp.sdc.be.config; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class CadiFilterParams { private String hostname; @@ -18,125 +23,4 @@ public class CadiFilterParams { private String AFT_LONGITUDE; private String AFT_ENVIRONMENT; private String cadiX509Issuers; - - public String getHostname() { - return hostname; - } - - public void setHostname(String hostname) { - this.hostname = hostname; - } - - public String getCsp_domain() { - return csp_domain; - } - - public void setCsp_domain(String csp_domain) { - this.csp_domain = csp_domain; - } - - public String getCadi_keyfile() { - return cadi_keyfile; - } - - public void setCadi_keyfile(String cadi_keyfile) { - this.cadi_keyfile = cadi_keyfile; - } - - public String getCadi_loglevel() { - return cadi_loglevel; - } - - public void setCadi_loglevel(String cadi_loglevel) { - this.cadi_loglevel = cadi_loglevel; - } - - public String getCadi_truststore() { - return cadi_truststore; - } - - public void setCadi_truststore(String cadi_truststore) { - this.cadi_truststore = cadi_truststore; - } - - public String getCadi_truststore_password() { - return cadi_truststore_password; - } - - public void setCadi_truststore_password(String cadi_truststore_password) { - this.cadi_truststore_password = cadi_truststore_password; - } - - public String getAaf_id() { - return aaf_id; - } - - public void setAaf_id(String aaf_id) { - this.aaf_id = aaf_id; - } - - public String getAaf_password() { - return aaf_password; - } - - public void setAaf_password(String aaf_password) { - this.aaf_password = aaf_password; - } - - public String getAaf_env() { - return aaf_env; - } - - public void setAaf_env(String aaf_env) { - this.aaf_env = aaf_env; - } - - public String getAafLocateUrl() { - return aafLocateUrl; - } - - public void setAafLocateUrl(String aafLocateUrl) { - this.aafLocateUrl = aafLocateUrl; - } - - public String getAaf_url() { - return aaf_url; - } - - public void setAaf_url(String aaf_url) { - this.aaf_url = aaf_url; - } - - public String getAFT_LATITUDE() { - return AFT_LATITUDE; - } - - public void setAFT_LATITUDE(String aFT_LATITUDE) { - AFT_LATITUDE = aFT_LATITUDE; - } - - public String getAFT_LONGITUDE() { - return AFT_LONGITUDE; - } - - public void setAFT_LONGITUDE(String aFT_LONGITUDE) { - AFT_LONGITUDE = aFT_LONGITUDE; - } - - public String getAFT_ENVIRONMENT() { - return AFT_ENVIRONMENT; - } - - public void setAFT_ENVIRONMENT(String aFT_ENVIRONMENT) { - AFT_ENVIRONMENT = aFT_ENVIRONMENT; - } - - public String getCadiX509Issuers() { - return cadiX509Issuers; - } - - public void setCadiX509Issuers(String cadiX509Issuers) { - this.cadiX509Issuers = cadiX509Issuers; - } - } diff --git a/common-app-api/src/main/java/org/openecomp/sdc/be/config/DmaapProducerConfiguration.java b/common-app-api/src/main/java/org/openecomp/sdc/be/config/DmaapProducerConfiguration.java index 52d1def11f..dce327c150 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/be/config/DmaapProducerConfiguration.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/be/config/DmaapProducerConfiguration.java @@ -1,7 +1,15 @@ package org.openecomp.sdc.be.config; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + /** * Contains DMAAP Client configuration parameters */ +@Getter +@Setter +@ToString public class DmaapProducerConfiguration { private Boolean active; @@ -29,297 +37,31 @@ public class DmaapProducerConfiguration { private String dme2preferredRouterFilePath; private Credential credential; private Integer timeLimitForNotificationHandleMs; - private boolean aftDme2SslEnable; - private boolean aftDme2ClientIgnoreSslConfig; - private String aftDme2ClientKeystore; - private String aftDme2ClientKeystorePassword; - private String aftDme2ClientSslCertAlias; - - - public Boolean getActive() { - return active; - } - - public void setActive(Boolean active) { - this.active = active; - } - - public String getHosts() { - return hosts; - } - - public void setHosts(String hosts) { - this.hosts = hosts; - } - - public String getConsumerGroup() { - return consumerGroup; - } - - public void setConsumerGroup(String consumerGroup) { - this.consumerGroup = consumerGroup; - } - - public String getConsumerId() { - return consumerId; - } - - public void setConsumerId(String consumerId) { - this.consumerId = consumerId; - } - - public Integer getTimeoutMs() { - return timeoutMs; - } - - public void setTimeoutMs(Integer timeoutMs) { - this.timeoutMs = timeoutMs; - } - - public Integer getLimit() { - return limit; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - - public Integer getPollingInterval() { - return pollingInterval; - } - - public void setPollingInterval(Integer pollingInterval) { - this.pollingInterval = pollingInterval; - } - - public String getTopic() { - return topic; - } - - public void setTopic(String topic) { - this.topic = topic; - } - - public Double getLatitude() { - return latitude; - } - - public void setLatitude(Double latitude) { - this.latitude = latitude; - } - - public Double getLongitude() { - return longitude; - } - - public void setLongitude(Double longitude) { - this.longitude = longitude; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getServiceName() { - return serviceName; - } - - public void setServiceName(String serviceName) { - this.serviceName = serviceName; - } - - public String getEnvironment() { - return environment; - } - - public void setEnvironment(String environment) { - this.environment = environment; - } - - public String getPartner() { - return partner; - } - - public void setPartner(String partner) { - this.partner = partner; - } - - public String getRouteOffer() { - return routeOffer; - } - - public void setRouteOffer(String routeOffer) { - this.routeOffer = routeOffer; - } - - public String getProtocol() { - return protocol; - } - - public void setProtocol(String protocol) { - this.protocol = protocol; - } - - public String getContenttype() { - return contenttype; - } - - public void setContenttype(String contenttype) { - this.contenttype = contenttype; - } + private boolean aftDme2SslEnable; + private boolean aftDme2ClientIgnoreSslConfig; + private String aftDme2ClientKeystore; + private String aftDme2ClientKeystorePassword; + private String aftDme2ClientSslCertAlias; public Boolean isDme2TraceOn() { return dme2TraceOn; } - public Boolean getDme2TraceOn() { - return dme2TraceOn; - } - - public void setDme2TraceOn(Boolean dme2TraceOn) { - this.dme2TraceOn = dme2TraceOn; - } - - public String getAftEnvironment() { - return aftEnvironment; - } - - public void setAftEnvironment(String aftEnvironment) { - this.aftEnvironment = aftEnvironment; - } - - public Integer getAftDme2ConnectionTimeoutMs() { - return aftDme2ConnectionTimeoutMs; - } - - public void setAftDme2ConnectionTimeoutMs(Integer aftDme2ConnectionTimeoutMs) { - this.aftDme2ConnectionTimeoutMs = aftDme2ConnectionTimeoutMs; - } - - public Integer getAftDme2RoundtripTimeoutMs() { - return aftDme2RoundtripTimeoutMs; - } - - public void setAftDme2RoundtripTimeoutMs(Integer aftDme2RoundtripTimeoutMs) { - this.aftDme2RoundtripTimeoutMs = aftDme2RoundtripTimeoutMs; - } - - public Integer getAftDme2ReadTimeoutMs() { - return aftDme2ReadTimeoutMs; - } - - public void setAftDme2ReadTimeoutMs(Integer aftDme2ReadTimeoutMs) { - this.aftDme2ReadTimeoutMs = aftDme2ReadTimeoutMs; - } - - public String getDme2preferredRouterFilePath() { - return dme2preferredRouterFilePath; - } - - public void setDme2preferredRouterFilePath(String dme2preferredRouterFilePath) { - this.dme2preferredRouterFilePath = dme2preferredRouterFilePath; - } - - public Credential getCredential() { - return credential; - } - - public void setCredential(Credential credential) { - this.credential = credential; - } - /** * Contains Dmaap Client credential parameters: username and password */ + @Getter + @Setter public static class Credential{ private String username; private String password; - public String getUsername() { - return username; - } - public void setUsername(String username) { - this.username = username; - } - public String getPassword() { - return password; - } - public void setPassword(String password) { - this.password = password; - } @Override public String toString() { return "Credential [username=" + username + ", password=" + password + "]"; } } - public Integer getTimeLimitForNotificationHandleMs() { - return timeLimitForNotificationHandleMs; - } - - public void setTimeLimitForNotificationHandleMs(Integer timeLimitForNotificationHandleMs) { - this.timeLimitForNotificationHandleMs = timeLimitForNotificationHandleMs; - } - - public boolean isAftDme2SslEnable() { - return aftDme2SslEnable; - } - - public void setAftDme2SslEnable(boolean aftDme2SslEnable) { - this.aftDme2SslEnable = aftDme2SslEnable; - } - - public boolean isAftDme2ClientIgnoreSslConfig() { - return aftDme2ClientIgnoreSslConfig; - } - - public void setAftDme2ClientIgnoreSslConfig(boolean aftDme2ClientIgnoreSslConfig) { - this.aftDme2ClientIgnoreSslConfig = aftDme2ClientIgnoreSslConfig; - } - - public String getAftDme2ClientKeystore() { - return aftDme2ClientKeystore; - } - - public void setAftDme2ClientKeystore(String aftDme2ClientKeystore) { - this.aftDme2ClientKeystore = aftDme2ClientKeystore; - } - - public String getAftDme2ClientKeystorePassword() { - return aftDme2ClientKeystorePassword; - } - - public void setAftDme2ClientKeystorePassword(String aftDme2ClientKeystorePassword) { - this.aftDme2ClientKeystorePassword = aftDme2ClientKeystorePassword; - } - - public String getAftDme2ClientSslCertAlias() { - return aftDme2ClientSslCertAlias; - } - - public void setAftDme2ClientSslCertAlias(String aftDme2ClientSslCertAlias) { - this.aftDme2ClientSslCertAlias = aftDme2ClientSslCertAlias; - } - - @Override - public String toString() { - return "DmaapProducerConfiguration [hosts=" + hosts + ", consumerGroup=" + consumerGroup + ", consumerId=" - + consumerId + ", timeoutMs=" + timeoutMs + ", limit=" + limit + ", pollingInterval=" + pollingInterval - + ", topic=" + topic + ", latitude=" + latitude + ", longitude=" + longitude + ", version=" + version - + ", serviceName=" + serviceName + ", environment=" + environment + ", partner=" + partner - + ", routeOffer=" + routeOffer + ", protocol=" + protocol + ", contenttype=" + contenttype - + ", dme2TraceOn=" + dme2TraceOn + ", aftEnvironment=" + aftEnvironment - + ", aftDme2ConnectionTimeoutMs=" + aftDme2ConnectionTimeoutMs + ", aftDme2RoundtripTimeoutMs=" - + aftDme2RoundtripTimeoutMs + ", aftDme2ReadTimeoutMs=" + aftDme2ReadTimeoutMs - + ", dme2preferredRouterFilePath=" + dme2preferredRouterFilePath - + ", timeLimitForNotificationHandleMs=" + timeLimitForNotificationHandleMs+ ", credential=" + credential - + ", aftDme2SslEnable=" + aftDme2SslEnable + ", aftDme2ClientIgnoreSslConfig=" + aftDme2ClientIgnoreSslConfig - + ", aftDme2ClientKeystore=" + aftDme2ClientKeystore + ", aftDme2ClientSslCertAlias=" + aftDme2ClientSslCertAlias + "]"; - } } diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckWrapper.java b/common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckWrapper.java index 29c6350516..80dac70f2a 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckWrapper.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/api/HealthCheckWrapper.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,43 +20,18 @@ package org.openecomp.sdc.common.api; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; + import java.util.List; +@Getter +@Setter +@AllArgsConstructor public class HealthCheckWrapper { - - String sdcVersion; - String siteMode; - List<HealthCheckInfo> componentsInfo; - - public HealthCheckWrapper(List<HealthCheckInfo> componentsInfo, String sdcVersion, String siteMode) { - super(); - this.componentsInfo = componentsInfo; - this.sdcVersion = sdcVersion; - this.siteMode = siteMode; - } - - public List<HealthCheckInfo> getComponentsInfo() { - return componentsInfo; - } - - public void setComponentsInfo(List<HealthCheckInfo> componentsInfo) { - this.componentsInfo = componentsInfo; - } - - public String getSdcVersion() { - return sdcVersion; - } - - public void setSdcVersion(String sdcVersion) { - this.sdcVersion = sdcVersion; - } - - public String getSiteMode() { - return siteMode; - } - - public void setSiteMode(String siteMode) { - this.siteMode = siteMode; - } + private List<HealthCheckInfo> componentsInfo; + private String sdcVersion; + private String siteMode; } |