summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main
diff options
context:
space:
mode:
authorTomasz Golabek <tomasz.golabek@nokia.com>2019-04-08 15:04:16 +0200
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-04-10 17:03:35 +0000
commit4568e48647b15b5654a669651ddf536d590288b0 (patch)
tree55b6381738eff0b2cbc966d23012dd828d98994d /catalog-be/src/main
parent00a6a4d66b0d22d530314816b4b5697fbc975e37 (diff)
Some unit tests for catalog-be
Code coverage for some classes from catalog-be increased. Some refactor made if needed. Change-Id: I1c5a35f99fcc0ace2f7b6ba4f7ef4f41acbed5e7 Issue-ID: SDC-2220 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
Diffstat (limited to 'catalog-be/src/main')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/info/CreateAndAssotiateInfo.java5
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusInfo.java28
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceInfo.java19
3 files changed, 29 insertions, 23 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/CreateAndAssotiateInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/CreateAndAssotiateInfo.java
index a7847a164d..b3a986306d 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/CreateAndAssotiateInfo.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/CreateAndAssotiateInfo.java
@@ -16,6 +16,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
*/
package org.openecomp.sdc.be.info;
@@ -27,8 +29,9 @@ public class CreateAndAssotiateInfo {
private ComponentInstance node;
private RequirementCapabilityRelDef associate;
+ CreateAndAssotiateInfo() {}
+
public CreateAndAssotiateInfo(ComponentInstance node, RequirementCapabilityRelDef associate) {
- super();
this.node = node;
this.associate = associate;
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusInfo.java
index c9eba2e764..f203e76419 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusInfo.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusInfo.java
@@ -16,6 +16,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
*/
package org.openecomp.sdc.be.info;
@@ -24,23 +26,25 @@ import org.openecomp.sdc.common.datastructure.AuditingFieldsKey;
import org.openecomp.sdc.common.datastructure.ESTimeBasedEvent;
public class DistributionStatusInfo {
- String omfComponentID;
- String timestamp;
- String url;
- String status;
- String errorReason;
+
+ private String omfComponentID;
+ private String timestamp;
+ private String url;
+ private String status;
+ private String errorReason;
+
+ DistributionStatusInfo() {
+ }
public DistributionStatusInfo(ESTimeBasedEvent distributionStatusEvent) {
- super();
- omfComponentID = (String) distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DISTRIBUTION_CONSUMER_ID.getDisplayName());
- timestamp = (String) distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DISTRIBUTION_STATUS_TIME.getDisplayName());
- url = (String) distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DISTRIBUTION_RESOURCE_URL.getDisplayName());
- status = (String) distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_STATUS.getDisplayName());
- errorReason = (String) distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DESC.getDisplayName());
+ omfComponentID = String.valueOf(distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DISTRIBUTION_CONSUMER_ID.getDisplayName()));
+ timestamp = String.valueOf(distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DISTRIBUTION_STATUS_TIME.getDisplayName()));
+ url = String.valueOf(distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DISTRIBUTION_RESOURCE_URL.getDisplayName()));
+ status = String.valueOf(distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_STATUS.getDisplayName()));
+ errorReason = String.valueOf(distributionStatusEvent.getFields().get(AuditingFieldsKey.AUDIT_DESC.getDisplayName()));
}
public DistributionStatusInfo(String omfComponentID, String timestamp, String url, String status) {
- super();
this.omfComponentID = omfComponentID;
this.timestamp = timestamp;
this.url = url;
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceInfo.java
index 533ca7e99f..1f98a26334 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceInfo.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceInfo.java
@@ -16,27 +16,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
*/
package org.openecomp.sdc.be.info;
public class DistributionStatusOfServiceInfo {
- String distributionID;
- String timestamp;
- String userId;
- String deployementStatus;
+ private String distributionID;
+ private String timestamp;
+ private String userId;
+ private String deployementStatus;
- public DistributionStatusOfServiceInfo() {
- super();
+ public DistributionStatusOfServiceInfo() {}
- }
-
- public DistributionStatusOfServiceInfo(String distributionID, String timestamp, String userId, String deployementStatus) {
+ public DistributionStatusOfServiceInfo(String distributionID, String timestamp, String userId, String deploymentStatus) {
super();
this.distributionID = distributionID;
this.timestamp = timestamp;
this.userId = userId;
- this.deployementStatus = deployementStatus;
+ this.deployementStatus = deploymentStatus;
}
public String getDistributionID() {