summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/main
diff options
context:
space:
mode:
authorxuegao <xue.gao@intl.att.com>2021-03-16 08:18:21 +0100
committerChristophe Closset <christophe.closset@intl.att.com>2021-03-17 12:06:31 +0000
commitfd07dec6fc32c6d20a5f6ca23587ec57fa2346aa (patch)
tree5e67d877dfa4a7f367f361357e38d97e63f084fa /catalog-model/src/main
parent425040c807f03eaae14b3c02708533f4f546d9c6 (diff)
Improve test coverage
Use Lombok annotations to improve test coverage. Issue-ID: SDC-3428 Signed-off-by: xuegao <xue.gao@intl.att.com> Change-Id: I3701c1ae8f8a1648c17227095071a7a581eb8ac1
Diffstat (limited to 'catalog-model/src/main')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentDependency.java71
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/GreaterOrEqualConstraint.java19
2 files changed, 13 insertions, 77 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentDependency.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentDependency.java
index b0f3f3fa91..ab4463caea 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentDependency.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/ComponentDependency.java
@@ -20,10 +20,16 @@
package org.openecomp.sdc.be.model;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
import java.util.ArrayList;
import java.util.List;
-
+@Getter
+@Setter
+@NoArgsConstructor
public class ComponentDependency {
private String name;
private String version;
@@ -35,69 +41,6 @@ public class ComponentDependency {
private List<ComponentDependency> dependencies;
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public String getUniqueId() {
- return uniqueId;
- }
-
- public void setUniqueId(String uniqueId) {
- this.uniqueId = uniqueId;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public List<ComponentDependency> getDependencies() {
- return dependencies;
- }
-
- public String getIcon() {
- return icon;
- }
-
- public void setIcon(String icon) {
- this.icon = icon;
- }
-
- public String getState() {
- return state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-
- public List<String> getInstanceNames() {
- return instanceNames;
- }
-
- public void setInstanceNames(List<String> instanceNames) {
- this.instanceNames = instanceNames;
- }
-
- public void setDependencies(List<ComponentDependency> dependencies) {
- this.dependencies = dependencies;
- }
public void addDependencies(List<ComponentDependency> dependencies) {
if ( this.dependencies == null ){
this.dependencies = new ArrayList<>();
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/GreaterOrEqualConstraint.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/GreaterOrEqualConstraint.java
index 2b23445452..cd132502ac 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/GreaterOrEqualConstraint.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/GreaterOrEqualConstraint.java
@@ -20,6 +20,9 @@
package org.openecomp.sdc.be.model.tosca.constraints;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.Setter;
import org.openecomp.sdc.be.model.PropertyConstraint;
import org.openecomp.sdc.be.model.tosca.ToscaType;
import org.openecomp.sdc.be.model.tosca.constraints.exception.ConstraintFunctionalException;
@@ -29,15 +32,14 @@ import org.openecomp.sdc.be.model.tosca.constraints.exception.PropertyConstraint
import javax.validation.constraints.NotNull;
+@Getter
+@Setter
+@AllArgsConstructor
public class GreaterOrEqualConstraint extends AbstractComparablePropertyConstraint {
@NotNull
private String greaterOrEqual;
- public GreaterOrEqualConstraint(String greaterOrEqual) {
- this.greaterOrEqual = greaterOrEqual;
- }
-
@Override
public void initialize(ToscaType propertyType) throws ConstraintValueDoNotMatchPropertyTypeException {
initialize(greaterOrEqual, propertyType);
@@ -64,13 +66,4 @@ public class GreaterOrEqualConstraint extends AbstractComparablePropertyConstrai
public String getErrorMessage(ToscaType toscaType, ConstraintFunctionalException e, String propertyName) {
return getErrorMessage(toscaType, e, propertyName, "%f property value must be >= %f", greaterOrEqual);
}
-
- public String getGreaterOrEqual() {
- return greaterOrEqual;
- }
-
- public void setGreaterOrEqual(String greaterOrEqual) {
- this.greaterOrEqual = greaterOrEqual;
- }
-
}