From c094ebe82e4e9797c4ee20c5e14bf293f7c193c4 Mon Sep 17 00:00:00 2001 From: xuegao Date: Mon, 15 Mar 2021 14:10:57 +0100 Subject: Improve test coverage Use Lombok annotations to improve test coverage. Issue-ID: SDC-3428 Change-Id: I78a9fa6171ba26e431b5e587b24548322c464ecc Signed-off-by: xuegao --- .../activitylog/dao/type/ActivityLogEntity.java | 88 ++-------------------- 1 file changed, 6 insertions(+), 82 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-activity-log-lib/openecomp-sdc-activity-log-api/src/main/java') diff --git a/openecomp-be/lib/openecomp-sdc-activity-log-lib/openecomp-sdc-activity-log-api/src/main/java/org/openecomp/sdc/activitylog/dao/type/ActivityLogEntity.java b/openecomp-be/lib/openecomp-sdc-activity-log-lib/openecomp-sdc-activity-log-api/src/main/java/org/openecomp/sdc/activitylog/dao/type/ActivityLogEntity.java index 3c65624c15..f878bea2df 100644 --- a/openecomp-be/lib/openecomp-sdc-activity-log-lib/openecomp-sdc-activity-log-api/src/main/java/org/openecomp/sdc/activitylog/dao/type/ActivityLogEntity.java +++ b/openecomp-be/lib/openecomp-sdc-activity-log-lib/openecomp-sdc-activity-log-api/src/main/java/org/openecomp/sdc/activitylog/dao/type/ActivityLogEntity.java @@ -20,11 +20,16 @@ import com.datastax.driver.mapping.annotations.ClusteringColumn; 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.versioning.dao.types.Version; import java.util.Date; - +@Getter +@Setter +@NoArgsConstructor @Table(keyspace = "dox", name = "activity_log") public class ActivityLogEntity { @PartitionKey @@ -43,15 +48,6 @@ public class ActivityLogEntity { private String message; private String comment; - /** - * Every entity class must have a default constructor according to - * - * Definition of mapped classes. - */ - public ActivityLogEntity() { - // Don't delete! Default constructor is required by DataStax driver - } - public ActivityLogEntity(String itemId, Version version) { this.itemId = itemId; this.versionId = version == null ? null : version.getId(); @@ -67,76 +63,4 @@ public class ActivityLogEntity { this.comment = comment; this.timestamp = new Date(); } - - 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 String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public ActivityType getType() { - return type; - } - - public void setType(ActivityType type) { - this.type = type; - } - - public String getUser() { - return user; - } - - public void setUser(String user) { - this.user = user; - } - - public Date getTimestamp() { - return timestamp; - } - - public void setTimestamp(Date timestamp) { - this.timestamp = timestamp; - } - - public boolean isSuccess() { - return success; - } - - public void setSuccess(boolean success) { - this.success = success; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } } -- cgit 1.2.3-korg