aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authortalio <tali.orenbach@amdocs.com>2017-11-14 16:07:58 +0200
committertalio <tali.orenbach@amdocs.com>2017-11-14 16:17:02 +0200
commitedf44a7fcc351eb304bc2f84e8d71414014cb0c0 (patch)
tree59eaf70cbb1e063c6bfddc0e60690ce4b79e68ab /common
parent316bb2532b2d012b126402ceead0365192cf1008 (diff)
forwarder test
add unit tests for forwarder healer Issue-Id : SDC-653 Change-Id: I06954e855aac09d16422929203926aa983269b92 Signed-off-by: talio <tali.orenbach@amdocs.com>
Diffstat (limited to 'common')
-rw-r--r--common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeTemplate.java62
1 files changed, 62 insertions, 0 deletions
diff --git a/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeTemplate.java b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeTemplate.java
index fabf5eac27..9901ea3138 100644
--- a/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeTemplate.java
+++ b/common/openecomp-tosca-datatype/src/main/java/org/openecomp/sdc/tosca/datatypes/model/NodeTemplate.java
@@ -134,4 +134,66 @@ public class NodeTemplate implements Template {
NodeTemplate clone = yamlUtil.yamlToObject(yamlUtil.objectToYaml(this), NodeTemplate.class);
return clone;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof NodeTemplate)) {
+ return false;
+ }
+
+ NodeTemplate that = (NodeTemplate) o;
+
+ if (type != null ? !type.equals(that.type) : that.type != null) {
+ return false;
+ }
+ if (description != null ? !description.equals(that.description) : that.description != null) {
+ return false;
+ }
+ if (directives != null ? !directives.equals(that.directives) : that.directives != null) {
+ return false;
+ }
+ if (properties != null ? !properties.equals(that.properties) : that.properties != null) {
+ return false;
+ }
+ if (attributes != null ? !attributes.equals(that.attributes) : that.attributes != null) {
+ return false;
+ }
+ if (requirements != null ? !requirements.equals(that.requirements)
+ : that.requirements != null) {
+ return false;
+ }
+ if (capabilities != null ? !capabilities.equals(that.capabilities)
+ : that.capabilities != null) {
+ return false;
+ }
+ if (interfaces != null ? !interfaces.equals(that.interfaces) : that.interfaces != null) {
+ return false;
+ }
+ if (artifacts != null ? !artifacts.equals(that.artifacts) : that.artifacts != null) {
+ return false;
+ }
+ if (node_filter != null ? !node_filter.equals(that.node_filter) : that.node_filter != null) {
+ return false;
+ }
+ return copy != null ? copy.equals(that.copy) : that.copy == null;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = type != null ? type.hashCode() : 0;
+ result = 31 * result + (description != null ? description.hashCode() : 0);
+ result = 31 * result + (directives != null ? directives.hashCode() : 0);
+ result = 31 * result + (properties != null ? properties.hashCode() : 0);
+ result = 31 * result + (attributes != null ? attributes.hashCode() : 0);
+ result = 31 * result + (requirements != null ? requirements.hashCode() : 0);
+ result = 31 * result + (capabilities != null ? capabilities.hashCode() : 0);
+ result = 31 * result + (interfaces != null ? interfaces.hashCode() : 0);
+ result = 31 * result + (artifacts != null ? artifacts.hashCode() : 0);
+ result = 31 * result + (node_filter != null ? node_filter.hashCode() : 0);
+ result = 31 * result + (copy != null ? copy.hashCode() : 0);
+ return result;
+ }
}