From f54b124ccfcf596e19d19ba2d24fd2702cd73c8d Mon Sep 17 00:00:00 2001 From: xuegao Date: Thu, 11 Mar 2021 17:22:46 +0100 Subject: Adding unit tests Adding unit tests to improve test coverage. Issue-ID: SDC-3428 Signed-off-by: xuegao Change-Id: I57da2ff92839cb78985e5f3d3c13dc575c1b6c17 --- .../elements/AnnotationTypeDataDefinition.java | 84 +++------------------- .../elements/MapAttributesDataDefinition.java | 22 ++---- 2 files changed, 17 insertions(+), 89 deletions(-) (limited to 'common-be/src/main/java/org/openecomp') diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AnnotationTypeDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AnnotationTypeDataDefinition.java index 38e52583c4..8eba3125e3 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AnnotationTypeDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AnnotationTypeDataDefinition.java @@ -20,23 +20,27 @@ package org.openecomp.sdc.be.datatypes.elements; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition; +@Getter +@Setter +@NoArgsConstructor +@ToString public class AnnotationTypeDataDefinition extends ToscaDataDefinition { protected String uniqueId; protected String type; + protected String version; + protected boolean highestVersion; protected String description; protected Long creationTime; protected Long modificationTime; - protected String version; - protected boolean highestVersion; - - public AnnotationTypeDataDefinition() { - } - public AnnotationTypeDataDefinition(AnnotationTypeDataDefinition other) { uniqueId = other.uniqueId; type = other.type; @@ -46,72 +50,4 @@ public class AnnotationTypeDataDefinition extends ToscaDataDefinition { modificationTime = other.modificationTime; highestVersion = other.highestVersion; } - - public String getUniqueId() { - return uniqueId; - } - - public void setUniqueId(String uniqueId) { - this.uniqueId = uniqueId; - } - - @Override - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Long getCreationTime() { - return creationTime; - } - - public void setCreationTime(Long creationTime) { - this.creationTime = creationTime; - } - - public Long getModificationTime() { - return modificationTime; - } - - public void setModificationTime(Long modificationTime) { - this.modificationTime = modificationTime; - } - - @Override - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public boolean isHighestVersion() { - return highestVersion; - } - - public void setHighestVersion(boolean highestVersion) { - this.highestVersion = highestVersion; - } - - @Override - public String toString() { - return getClass().getName() + ": [uniqueId=" + uniqueId + ", type=" + getType() - + ", version=" + version + ", highestVersion=" + highestVersion - + ", description=" + description - + ", creationTime=" + creationTime + ", modificationTime=" + modificationTime + "]"; - } - - } diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapAttributesDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapAttributesDataDefinition.java index 31c791681c..af82508813 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapAttributesDataDefinition.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapAttributesDataDefinition.java @@ -23,9 +23,16 @@ package org.openecomp.sdc.be.datatypes.elements; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + import java.util.HashMap; import java.util.Map; +@Getter +@Setter +@NoArgsConstructor public class MapAttributesDataDefinition extends MapDataDefinition { private String parentName; @@ -49,11 +56,6 @@ public class MapAttributesDataDefinition extends MapDataDefinition getMapToscaDataDefinition() { @@ -64,14 +66,4 @@ public class MapAttributesDataDefinition extends MapDataDefinition mapToscaDataDefinition) { this.mapToscaDataDefinition = mapToscaDataDefinition; } - - public String getParentName() { - return parentName; - } - - public void setParentName(String parentName) { - this.parentName = parentName; - } - - } -- cgit 1.2.3-korg