From b2c0528da052b5c73e3fc1f7f98d22578acd91f0 Mon Sep 17 00:00:00 2001 From: xuegao Date: Fri, 19 Mar 2021 14:04:17 +0100 Subject: Improve test coverage Add unit tests to improve test coverage. Issue-ID: SDC-3428 Change-Id: I29a8f1d49f1dfd6bca79f3d873d1e1ff7adc4fb2 Signed-off-by: xuegao --- .../openecomp/sdc/be/resources/data/TagData.java | 51 ++++------------------ 1 file changed, 8 insertions(+), 43 deletions(-) (limited to 'catalog-dao/src/main') diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/TagData.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/TagData.java index 43b52e2a54..949aa83c14 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/TagData.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/TagData.java @@ -20,6 +20,10 @@ package org.openecomp.sdc.be.resources.data; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; import org.openecomp.sdc.be.dao.graph.datatype.GraphNode; import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; @@ -27,6 +31,10 @@ import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import java.util.HashMap; import java.util.Map; +@Getter +@Setter +@EqualsAndHashCode +@ToString public class TagData extends GraphNode { private String name; @@ -56,49 +64,6 @@ public class TagData extends GraphNode { return map; } - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - return "Tag [Name=" + name + "]"; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((name == null) ? 0 : name.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - TagData other = (TagData) obj; - if (name == null) { - if (other.getClass() != null) { - return false; - } - } else if (!name.equals(other.getName())) { - return false; - } - return true; - } - @Override public String getUniqueIdKey() { return GraphPropertiesDictionary.NAME.getProperty(); -- cgit 1.2.3-korg