aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main
diff options
context:
space:
mode:
authorDmitry Puzikov <d.puzikov2@partner.samsung.com>2020-03-23 17:27:25 +0100
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-03-24 08:34:33 +0000
commit91ac6b9f294828bec7e8e9200f5dabaf64f2a4f3 (patch)
treefcf3cdbd2b570c129b72c42708df40fc99af0a92 /catalog-be/src/main
parent8448309e0e1aed102a34bafbb53b1fd9b9600bfe (diff)
Fix unit tests
Add asserts where required, fix tiny issues. Replace DTO getters-setters with Lombok anntations. Change-Id: I77c7ff2b1b536e357910ab1820ff27e03a16967a Issue-ID: SDC-2849 Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com>
Diffstat (limited to 'catalog-be/src/main')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ArtifactMetadata.java94
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductAssetMetadata.java47
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductCategoryGroupMetadata.java37
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetDetailedMetadata.java45
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetMetadata.java45
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceInstanceMetadata.java60
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetDetailedMetadata.java28
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetMetadata.java37
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceDistributionRespInfo.java25
9 files changed, 48 insertions, 370 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ArtifactMetadata.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ArtifactMetadata.java
index e41d8d7548..7b68ffeee7 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ArtifactMetadata.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ArtifactMetadata.java
@@ -20,6 +20,11 @@
package org.openecomp.sdc.be.externalapi.servlet.representation;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
public class ArtifactMetadata {
private String artifactName;
private String artifactType;
@@ -32,93 +37,4 @@ public class ArtifactMetadata {
private String generatedFromUUID;
private String artifactLabel;
private String artifactGroupType;
-
- public String getArtifactName() {
- return artifactName;
- }
-
- public void setArtifactName(String artifactName) {
- this.artifactName = artifactName;
- }
-
- public String getArtifactType() {
- return artifactType;
- }
-
- public void setArtifactType(String artifactType) {
- this.artifactType = artifactType;
- }
-
- public String getArtifactURL() {
- return artifactURL;
- }
-
- public void setArtifactURL(String artifactURL) {
- this.artifactURL = artifactURL;
- }
-
- public String getArtifactDescription() {
- return artifactDescription;
- }
-
- public void setArtifactDescription(String artifactDescription) {
- this.artifactDescription = artifactDescription;
- }
-
- public Integer getArtifactTimeout() {
- return artifactTimeout;
- }
-
- public void setArtifactTimeout(Integer artifactTimeout) {
- this.artifactTimeout = artifactTimeout;
- }
-
- public String getArtifactChecksum() {
- return artifactChecksum;
- }
-
- public void setArtifactChecksum(String artifactChecksum) {
- this.artifactChecksum = artifactChecksum;
- }
-
- public String getArtifactUUID() {
- return artifactUUID;
- }
-
- public void setArtifactUUID(String artifactUUID) {
- this.artifactUUID = artifactUUID;
- }
-
- public String getArtifactVersion() {
- return artifactVersion;
- }
-
- public void setArtifactVersion(String artifactVersion) {
- this.artifactVersion = artifactVersion;
- }
-
- public String getGeneratedFromUUID() {
- return generatedFromUUID;
- }
-
- public void setGeneratedFromUUID(String generatedFromUUID) {
- this.generatedFromUUID = generatedFromUUID;
- }
-
- public String getArtifactLabel() {
- return artifactLabel;
- }
-
- public void setArtifactLabel(String artifactLabel) {
- this.artifactLabel = artifactLabel;
- }
-
- public String getArtifactGroupType() {
- return artifactGroupType;
- }
-
- public void setArtifactGroupType(String artifactGroupType) {
- this.artifactGroupType = artifactGroupType;
- }
-
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductAssetMetadata.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductAssetMetadata.java
index 40b78c12d3..90801afa4a 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductAssetMetadata.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductAssetMetadata.java
@@ -21,52 +21,15 @@
package org.openecomp.sdc.be.externalapi.servlet.representation;
import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
+@Getter
+@Setter
public class ProductAssetMetadata extends AssetMetadata {
private String lifecycleState;
private String lastUpdaterUserId;
- private boolean isActive;
+ private boolean active;
private List<String> contacts;
private List<ProductCategoryGroupMetadata> productGroupings;
-
- public String getLifecycleState() {
- return lifecycleState;
- }
-
- public void setLifecycleState(String lifecycleState) {
- this.lifecycleState = lifecycleState;
- }
-
- public String getLastUpdaterUserId() {
- return lastUpdaterUserId;
- }
-
- public void setLastUpdaterUserId(String lastUpdaterUserId) {
- this.lastUpdaterUserId = lastUpdaterUserId;
- }
-
- public boolean isActive() {
- return isActive;
- }
-
- public void setActive(boolean isActive) {
- this.isActive = isActive;
- }
-
- public List<String> getContacts() {
- return contacts;
- }
-
- public void setContacts(List<String> contacts) {
- this.contacts = contacts;
- }
-
- public List<ProductCategoryGroupMetadata> getProductGroupings() {
- return productGroupings;
- }
-
- public void setProductGroupings(List<ProductCategoryGroupMetadata> productGroupings) {
- this.productGroupings = productGroupings;
- }
-
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductCategoryGroupMetadata.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductCategoryGroupMetadata.java
index 7d666df703..28137063e2 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductCategoryGroupMetadata.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ProductCategoryGroupMetadata.java
@@ -20,38 +20,15 @@
package org.openecomp.sdc.be.externalapi.servlet.representation;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+@AllArgsConstructor
public class ProductCategoryGroupMetadata {
private String category;
private String subCategory;
private String group;
-
- public ProductCategoryGroupMetadata(String category, String subCategory, String group) {
- this.category = category;
- this.subCategory = subCategory;
- this.group = group;
- }
-
- public String getCategory() {
- return category;
- }
-
- public void setCategory(String category) {
- this.category = category;
- }
-
- public String getSubCategory() {
- return subCategory;
- }
-
- public void setSubCategory(String subCategory) {
- this.subCategory = subCategory;
- }
-
- public String getGroup() {
- return group;
- }
-
- public void setGroup(String group) {
- this.group = group;
- }
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetDetailedMetadata.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetDetailedMetadata.java
index eb15e077de..0e50c4dafa 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetDetailedMetadata.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetDetailedMetadata.java
@@ -21,7 +21,11 @@
package org.openecomp.sdc.be.externalapi.servlet.representation;
import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
+@Getter
+@Setter
public class ResourceAssetDetailedMetadata extends ResourceAssetMetadata {
private String lastUpdaterFullName;
@@ -29,45 +33,4 @@ public class ResourceAssetDetailedMetadata extends ResourceAssetMetadata {
private List<ResourceInstanceMetadata> resources;
private List<ArtifactMetadata> artifacts;
private String description;
-
- public String getLastUpdaterFullName() {
- return lastUpdaterFullName;
- }
-
- public void setLastUpdaterFullName(String lastUpdaterFullName) {
- this.lastUpdaterFullName = lastUpdaterFullName;
- }
-
- public String getToscaResourceName() {
- return toscaResourceName;
- }
-
- public void setToscaResourceName(String toscaResourceName) {
- this.toscaResourceName = toscaResourceName;
- }
-
- public List<ResourceInstanceMetadata> getResources() {
- return resources;
- }
-
- public void setResources(List<ResourceInstanceMetadata> resources) {
- this.resources = resources;
- }
-
- public List<ArtifactMetadata> getArtifacts() {
- return artifacts;
- }
-
- public void setArtifacts(List<ArtifactMetadata> artifactMetaList) {
- this.artifacts = artifactMetaList;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetMetadata.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetMetadata.java
index 455e125ffc..a75335aaa1 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetMetadata.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceAssetMetadata.java
@@ -20,50 +20,15 @@
package org.openecomp.sdc.be.externalapi.servlet.representation;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
public class ResourceAssetMetadata extends AssetMetadata {
private String category;
private String subCategory;
private String resourceType;
private String lifecycleState;
private String lastUpdaterUserId;
-
- public String getCategory() {
- return category;
- }
-
- public void setCategory(String category) {
- this.category = category;
- }
-
- public String getSubCategory() {
- return subCategory;
- }
-
- public void setSubCategory(String subCategory) {
- this.subCategory = subCategory;
- }
-
- public String getResourceType() {
- return resourceType;
- }
-
- public void setResourceType(String resourceType) {
- this.resourceType = resourceType;
- }
-
- public String getLifecycleState() {
- return lifecycleState;
- }
-
- public void setLifecycleState(String lifecycleState) {
- this.lifecycleState = lifecycleState;
- }
-
- public String getLastUpdaterUserId() {
- return lastUpdaterUserId;
- }
-
- public void setLastUpdaterUserId(String lastUpdaterUserId) {
- this.lastUpdaterUserId = lastUpdaterUserId;
- }
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceInstanceMetadata.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceInstanceMetadata.java
index 1023f82249..da2a9ec466 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceInstanceMetadata.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ResourceInstanceMetadata.java
@@ -21,7 +21,11 @@
package org.openecomp.sdc.be.externalapi.servlet.representation;
import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
+@Getter
+@Setter
public class ResourceInstanceMetadata {
private String resourceInstanceName;
private String resourceName;
@@ -30,60 +34,4 @@ public class ResourceInstanceMetadata {
private String resoucreType;
private String resourceUUID;
private List<ArtifactMetadata> artifacts;
-
- public String getResourceInstanceName() {
- return resourceInstanceName;
- }
-
- public void setResourceInstanceName(String resourceInstanceName) {
- this.resourceInstanceName = resourceInstanceName;
- }
-
- public String getResourceName() {
- return resourceName;
- }
-
- public void setResourceName(String resourceName) {
- this.resourceName = resourceName;
- }
-
- public String getResourceInvariantUUID() {
- return resourceInvariantUUID;
- }
-
- public void setResourceInvariantUUID(String resourceInvariantUUID) {
- this.resourceInvariantUUID = resourceInvariantUUID;
- }
-
- public String getResourceVersion() {
- return resourceVersion;
- }
-
- public void setResourceVersion(String resourceVersion) {
- this.resourceVersion = resourceVersion;
- }
-
- public String getResoucreType() {
- return resoucreType;
- }
-
- public void setResoucreType(String resoucreType) {
- this.resoucreType = resoucreType;
- }
-
- public String getResourceUUID() {
- return resourceUUID;
- }
-
- public void setResourceUUID(String resourceUUID) {
- this.resourceUUID = resourceUUID;
- }
-
- public List<ArtifactMetadata> getArtifacts() {
- return artifacts;
- }
-
- public void setArtifacts(List<ArtifactMetadata> artifacts) {
- this.artifacts = artifacts;
- }
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetDetailedMetadata.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetDetailedMetadata.java
index e677fdc190..cc4e39878a 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetDetailedMetadata.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetDetailedMetadata.java
@@ -21,33 +21,13 @@
package org.openecomp.sdc.be.externalapi.servlet.representation;
import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
+@Getter
+@Setter
public class ServiceAssetDetailedMetadata extends ServiceAssetMetadata {
private String lastUpdaterFullName;
private List<ResourceInstanceMetadata> resources;
private List<ArtifactMetadata> artifacts;
-
- public String getLastUpdaterFullName() {
- return lastUpdaterFullName;
- }
-
- public void setLastUpdaterFullName(String lastUpdaterFullName) {
- this.lastUpdaterFullName = lastUpdaterFullName;
- }
-
- public List<ResourceInstanceMetadata> getResources() {
- return resources;
- }
-
- public void setResources(List<ResourceInstanceMetadata> resources) {
- this.resources = resources;
- }
-
- public List<ArtifactMetadata> getArtifacts() {
- return artifacts;
- }
-
- public void setArtifacts(List<ArtifactMetadata> artifacts) {
- this.artifacts = artifacts;
- }
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetMetadata.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetMetadata.java
index 6e5ac8426c..3308343d94 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetMetadata.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceAssetMetadata.java
@@ -20,41 +20,14 @@
package org.openecomp.sdc.be.externalapi.servlet.representation;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
public class ServiceAssetMetadata extends AssetMetadata {
private String category;
private String lifecycleState;
private String lastUpdaterUserId;
private String distributionStatus;
-
- public String getCategory() {
- return category;
- }
-
- public void setCategory(String category) {
- this.category = category;
- }
-
- public String getLifecycleState() {
- return lifecycleState;
- }
-
- public void setLifecycleState(String lifecycleState) {
- this.lifecycleState = lifecycleState;
- }
-
- public String getLastUpdaterUserId() {
- return lastUpdaterUserId;
- }
-
- public void setLastUpdaterUserId(String lastUpdaterUserId) {
- this.lastUpdaterUserId = lastUpdaterUserId;
- }
-
- public String getDistributionStatus() {
- return distributionStatus;
- }
-
- public void setDistributionStatus(String distributionStatus) {
- this.distributionStatus = distributionStatus;
- }
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceDistributionRespInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceDistributionRespInfo.java
index c5e1a42290..1ba33ad257 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceDistributionRespInfo.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/representation/ServiceDistributionRespInfo.java
@@ -20,25 +20,18 @@
package org.openecomp.sdc.be.externalapi.servlet.representation;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
/**
* Created by chaya on 10/26/2017.
*/
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
public class ServiceDistributionRespInfo {
-
private String distributionId;
-
- public ServiceDistributionRespInfo() {
- }
-
- public ServiceDistributionRespInfo(String distributionId) {
- this.distributionId = distributionId;
- }
-
- public String getDistributionId() {
- return distributionId;
- }
-
- public void setDistributionId(String distributionId) {
- this.distributionId = distributionId;
- }
}