summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java
diff options
context:
space:
mode:
authorxuegao <xue.gao@intl.att.com>2021-03-15 14:10:57 +0100
committerChristophe Closset <christophe.closset@intl.att.com>2021-03-16 13:31:41 +0000
commitc094ebe82e4e9797c4ee20c5e14bf293f7c193c4 (patch)
tree779d5308199edf97643a9569676bb22b41905980 /openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java
parent1da764ea13793535597dc6518b5e953393e9dbe0 (diff)
Improve test coverage
Use Lombok annotations to improve test coverage. Issue-ID: SDC-3428 Change-Id: I78a9fa6171ba26e431b5e587b24548322c464ecc Signed-off-by: xuegao <xue.gao@intl.att.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java')
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java39
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java104
-rw-r--r--openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/OpenEcompComponentEntity.java37
3 files changed, 20 insertions, 160 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java
index bc34b8dfda..bd6a978ed6 100644
--- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionArtifactEntity.java
@@ -23,10 +23,16 @@ package org.openecomp.sdc.action.dao.types;
import com.datastax.driver.mapping.annotations.Column;
import com.datastax.driver.mapping.annotations.PartitionKey;
import com.datastax.driver.mapping.annotations.Table;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
import org.openecomp.sdc.action.types.ActionArtifact;
import java.nio.ByteBuffer;
+@Getter
+@Setter
+@NoArgsConstructor
@Table(keyspace = "dox", name = "action_artifact")
public class ActionArtifactEntity {
@@ -41,44 +47,11 @@ public class ActionArtifactEntity {
@Column(name = "artifact")
private ByteBuffer artifact;
- /**
- * Every entity class must have a default constructor according to
- * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
- * Definition of mapped classes</a>.
- */
- public ActionArtifactEntity() {
- // Don't delete! Default constructor is required by DataStax driver
- }
-
public ActionArtifactEntity(String artifactUuId, int effectiveVersion) {
this.artifactUuId = artifactUuId;
this.effectiveVersion = effectiveVersion;
}
- public String getArtifactUuId() {
- return artifactUuId;
- }
-
- public void setArtifactUuId(String artifactUuId) {
- this.artifactUuId = artifactUuId;
- }
-
- public int getEffectiveVersion() {
- return effectiveVersion;
- }
-
- public void setEffectiveVersion(int effectiveVersion) {
- this.effectiveVersion = effectiveVersion;
- }
-
- public ByteBuffer getArtifact() {
- return artifact;
- }
-
- public void setArtifact(ByteBuffer artifact) {
- this.artifact = artifact;
- }
-
/**
* To dto action artifact.
*
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java
index 17f6deaa72..d84d560557 100644
--- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/ActionEntity.java
@@ -25,11 +25,16 @@ import java.util.Date;
import java.util.Set;
import java.util.stream.Collectors;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
import org.openecomp.core.utilities.json.JsonUtil;
import org.openecomp.sdc.action.types.Action;
import org.openecomp.sdc.versioning.dao.types.Version;
-
+@Getter
+@Setter
+@NoArgsConstructor
@Table(keyspace = "dox", name = "Action")
public class ActionEntity {
@@ -61,64 +66,11 @@ public class ActionEntity {
@Column(name = "data")
private String data;
- /**
- * Every entity class must have a default constructor according to
- * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
- * Definition of mapped classes</a>.
- */
- public ActionEntity() {
- // Don't delete! Default constructor is required by DataStax driver
- }
-
public ActionEntity(String actionInvariantUuId, Version version) {
this.actionInvariantUuId = actionInvariantUuId;
this.version = version;
}
- public String getActionUuId() {
- return actionUuId;
- }
-
- public void setActionUuId(String actionUuId) {
- this.actionUuId = actionUuId;
- }
-
- public String getActionInvariantUuId() {
- return actionInvariantUuId;
- }
-
- public void setActionInvariantUuId(String actionInvariantUuId) {
- this.actionInvariantUuId = actionInvariantUuId;
- }
-
- public Version getVersion() {
- return version;
- }
-
- public void setVersion(Version version) {
- this.version = version;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public Set<String> getVendorList() {
- return vendorList;
- }
-
/**
* Sets vendor list.
*
@@ -129,10 +81,6 @@ public class ActionEntity {
vendorList.stream().map(String::toLowerCase).collect(Collectors.toSet()) : vendorList;
}
- public Set<String> getCategoryList() {
- return categoryList;
- }
-
/**
* Sets category list.
*
@@ -144,46 +92,6 @@ public class ActionEntity {
categoryList;
}
- public Date getTimestamp() {
- return timestamp;
- }
-
- public void setTimestamp(Date timestamp) {
- this.timestamp = timestamp;
- }
-
- public String getUser() {
- return user;
- }
-
- public void setUser(String user) {
- this.user = user;
- }
-
- public Set<String> getSupportedModels() {
- return supportedModels;
- }
-
- public void setSupportedModels(Set<String> supportedModels) {
- this.supportedModels = supportedModels;
- }
-
- public Set<String> getSupportedComponents() {
- return supportedComponents;
- }
-
- public void setSupportedComponents(Set<String> supportedComponents) {
- this.supportedComponents = supportedComponents;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
/**
* To dto action.
*
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/OpenEcompComponentEntity.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/OpenEcompComponentEntity.java
index a5025e5de8..f8380a9785 100644
--- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/OpenEcompComponentEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/dao/types/OpenEcompComponentEntity.java
@@ -23,8 +23,16 @@ package org.openecomp.sdc.action.dao.types;
import com.datastax.driver.mapping.annotations.Column;
import com.datastax.driver.mapping.annotations.PartitionKey;
import com.datastax.driver.mapping.annotations.Table;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
import org.openecomp.sdc.action.types.OpenEcompComponent;
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
@Table(keyspace = "dox", name = "EcompComponent")
public class OpenEcompComponentEntity {
@@ -35,35 +43,6 @@ public class OpenEcompComponentEntity {
@Column(name = "name")
private String name;
- /**
- * Every entity class must have a default constructor according to
- * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
- * Definition of mapped classes</a>.
- */
- public OpenEcompComponentEntity() {
- // Don't delete! Default constructor is required by DataStax driver
- }
-
- public OpenEcompComponentEntity(String id, String name) {
- this.id = id;
- this.name = name;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
/**
* To dto OPENECOMP component.