aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/tools
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/tools
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/tools')
-rw-r--r--openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/HealingHandler.java4
-rw-r--r--openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntity.java66
2 files changed, 10 insertions, 60 deletions
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/HealingHandler.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/HealingHandler.java
index fe92b397cd..e5c541216c 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/HealingHandler.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/HealingHandler.java
@@ -42,11 +42,11 @@ public class HealingHandler {
public void populateHealingTable(List<HealingEntity> healingEntities) {
healingEntities.forEach(healingEntity -> {
if (isHealingRecordExist(healingEntity)) {
- accessor.updateFlag(healingEntity.getHealingFlag(), healingEntity.getSpace(),
+ accessor.updateFlag(healingEntity.isHealingFlag(), healingEntity.getSpace(),
healingEntity.getItemId(), healingEntity.getVersionId());
} else {
accessor.create(healingEntity.getSpace(), healingEntity.getItemId(),
- healingEntity.getVersionId(), healingEntity.getHealingFlag(),
+ healingEntity.getVersionId(), healingEntity.isHealingFlag(),
healingEntity.getOldVersion());
}
});
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntity.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntity.java
index b25b8fbec4..155c8e2215 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntity.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntity.java
@@ -18,10 +18,18 @@ package org.openecomp.core.tools.store.zusammen.datatypes;
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;
/**
* Created by ayalaben on 10/15/2017
*/
+@Getter
+@Setter
+@AllArgsConstructor
+@NoArgsConstructor
@Table(keyspace = "dox", name = "healing")
public class HealingEntity {
@@ -42,62 +50,4 @@ public class HealingEntity {
@Column(name = "old_version")
private String oldVersion;
-
- /**
- * 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 HealingEntity() {
- // Don't delete! Default constructor is required by DataStax driver
- }
-
- public HealingEntity(String space, String itemId, String versionId, boolean healingFlag,
- String oldVersion) {
- this.space = space;
- this.itemId = itemId;
- this.versionId = versionId;
- this.healingFlag = healingFlag;
- this.oldVersion = oldVersion;
- }
-
- public String getSpace() {
- return space;
- }
-
- public void setSpace(String space) {
- this.space = space;
- }
-
- public String getItemId() {
- return itemId;
- }
-
- public void setItemId(String itemId) {
- this.itemId = itemId;
- }
-
- public String getVersionId() {
- return versionId;
- }
-
- public void setVersionId(String versionId) {
- this.versionId = versionId;
- }
-
- public boolean getHealingFlag() {
- return healingFlag;
- }
-
- public void setHealingFlag(boolean healingFlag) {
- this.healingFlag = healingFlag;
- }
-
- public String getOldVersion() {
- return oldVersion;
- }
-
- public void setOldVersion(String oldVersion) {
- this.oldVersion = oldVersion;
- }
}