diff options
author | Dmitry Puzikov <d.puzikov2@partner.samsung.com> | 2020-04-01 17:11:21 +0200 |
---|---|---|
committer | Dmitry Puzikov <d.puzikov2@partner.samsung.com> | 2020-04-01 21:12:13 +0200 |
commit | 0968bd68620bbd22e7ab855c9252be4178953a3a (patch) | |
tree | d36262a7874c0995d02bc68d7c86f9c889e649b0 /catalog-be/src/main/java | |
parent | 0323dc0535e4af4c5aa2d7ef4a3fb4eb4cb9a813 (diff) |
Tests added to increase coverage
Change-Id: I16a729385647cb691fb7c94bd8f26a3c19b1b99d
Issue-ID: SDC-2861
Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com>
Diffstat (limited to 'catalog-be/src/main/java')
3 files changed, 23 insertions, 86 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/CapabilityFilter.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/CapabilityFilter.java index 8afd9518ba..0197c3dabe 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/CapabilityFilter.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/CapabilityFilter.java @@ -16,40 +16,26 @@ package org.openecomp.sdc.be.tosca.model; - +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; import org.apache.commons.collections.CollectionUtils; import java.util.ArrayList; import java.util.List; import java.util.Map; - - +@Getter +@Setter +@ToString public class CapabilityFilter { - List<Map<String, List<Object>>> properties; - - public List<Map<String, List<Object>>> getProperties() { - return properties; - } - - public void setProperties(List<Map<String, List<Object>>> properties) { - this.properties = properties; - } + private List<Map<String, List<Object>>> properties; public void addProperty(Map<String, List<Object>> property) { if(CollectionUtils.isEmpty(properties)) { this.properties = new ArrayList<>(); } - this.properties.add(property); } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("CapabilityFilter{"); - sb.append("properties=").append(properties); - sb.append('}'); - return sb.toString(); - } } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/NodeFilter.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/NodeFilter.java index 79e9f57209..f5511edd1b 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/NodeFilter.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/model/NodeFilter.java @@ -17,34 +17,13 @@ package org.openecomp.sdc.be.tosca.model; import java.util.List; import java.util.Map; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class NodeFilter { - - Object tosca_id; - List<Map<String, List<Object>>> properties; - List<Map<String, CapabilityFilter>> capabilities; - - public Object getTosca_id() { - return tosca_id; - } - - public void setTosca_id(Object tosca_id) { - this.tosca_id = tosca_id; - } - - public List<Map<String, CapabilityFilter>> getCapabilities() { - return capabilities; - } - - public void setCapabilities(List<Map<String, CapabilityFilter>> capabilities) { - this.capabilities = capabilities; - } - - public List<Map<String, List<Object>>> getProperties() { - return properties; - } - - public void setProperties(List<Map<String, List<Object>>> properties) { - this.properties = properties; - } + private Object tosca_id; + private List<Map<String, List<Object>>> properties; + private List<Map<String, CapabilityFilter>> capabilities; }
\ No newline at end of file diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/user/UserMessage.java b/catalog-be/src/main/java/org/openecomp/sdc/be/user/UserMessage.java index 362bf34592..73943f6c4e 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/user/UserMessage.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/user/UserMessage.java @@ -20,51 +20,23 @@ package org.openecomp.sdc.be.user; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; import org.openecomp.sdc.be.catalog.api.ITypeMessage; -public class UserMessage implements ITypeMessage{ +@Getter +@Setter +@AllArgsConstructor +@ToString +public class UserMessage implements ITypeMessage { private UserOperationEnum operation; private String userId; private String role; - public UserMessage(UserOperationEnum operation, String userId, String role) { - this.setOperation(operation); - this.setUserId(userId); - this.setRole(role); - } - - public UserOperationEnum getOperation() { - return operation; - } - - public void setOperation(UserOperationEnum operation) { - this.operation = operation; - } - - public String getUserId() { - return userId; - } - - public void setUserId(String userId) { - this.userId = userId; - } - - public String getRole() { - return role; - } - - public void setRole(String role) { - this.role = role; - } - - @Override - public String toString() { - return "UserMessage [operation=" + operation + ", userId=" + userId + ", role=" + role + "]"; - } - @Override public String getMessageType() { return getClass().getSimpleName(); } - } |