Increase test coverage 00/104500/4
authorvasraz <vasyl.razinkov@est.tech>
Thu, 26 Mar 2020 14:20:02 +0000 (14:20 +0000)
committerOfir Sonsino <ofir.sonsino@intl.att.com>
Mon, 30 Mar 2020 12:03:46 +0000 (12:03 +0000)
Change-Id: Ibc6134e5954537258541ff018dc9794191d4e907
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-2833

21 files changed:
catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/UiComponentDataConverter.java
catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UIConstraint.java
catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UINodeFilter.java
catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCategories.java
catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java
catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransfer.java
catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java
catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiLeftPaletteComponent.java
catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransfer.java
catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java
catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransfer.java
catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceMetadata.java
catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UIConstraintTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UINodeFilterTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiCategoriesTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiCombinationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransferTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransferTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiResourceMetadataTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransferTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiServiceMetadataTest.java

index fa6ffcf..7f9219b 100644 (file)
@@ -405,10 +405,10 @@ public class UiComponentDataConverter {
                     break;
                 case NODE_FILTER:
                     if(service.getNodeFilterComponents() == null) {
-                        dataTransfer.setNodeFilterData(null);
+                        dataTransfer.setNodeFilterforNode(null);
                     } else {
                         NodeFilterConverter nodeFilterConverter = new NodeFilterConverter();
-                        dataTransfer.setNodeFilterData(nodeFilterConverter.convertDataMapToUI(service.getNodeFilterComponents()));
+                        dataTransfer.setNodeFilterforNode(nodeFilterConverter.convertDataMapToUI(service.getNodeFilterComponents()));
                     }
 
                     break;
index 63353c1..638e236 100644 (file)
@@ -19,7 +19,11 @@ package org.openecomp.sdc.be.ui.model;
 import com.google.common.base.MoreObjects;
 import com.google.common.base.Objects;
 import java.io.Serializable;
+import lombok.Getter;
+import lombok.Setter;
 
+@Getter
+@Setter
 public class UIConstraint implements Serializable {
 
     private String servicePropertyName;
@@ -39,7 +43,7 @@ public class UIConstraint implements Serializable {
     }
 
     public UIConstraint(String servicePropertyName, String constraintOperator, String sourceType, String sourceName,
-            Object value) {
+                        Object value) {
         this.servicePropertyName = servicePropertyName;
         this.constraintOperator = constraintOperator;
         this.sourceType = sourceType;
@@ -47,46 +51,6 @@ public class UIConstraint implements Serializable {
         this.value = value;
     }
 
-    public String getServicePropertyName() {
-        return servicePropertyName;
-    }
-
-    public void setServicePropertyName(String servicePropertyName) {
-        this.servicePropertyName = servicePropertyName;
-    }
-
-    public String getConstraintOperator() {
-        return constraintOperator;
-    }
-
-    public void setConstraintOperator(String constraintOperator) {
-        this.constraintOperator = constraintOperator;
-    }
-
-    public String getSourceType() {
-        return sourceType;
-    }
-
-    public void setSourceType(String sourceType) {
-        this.sourceType = sourceType;
-    }
-
-    public Object getValue() {
-        return value;
-    }
-
-    public void setValue(Object value) {
-        this.value = value;
-    }
-
-    public String getSourceName() {
-        return sourceName;
-    }
-
-    public void setSourceName(String sourceName) {
-        this.sourceName = sourceName;
-    }
-
     @Override
     public boolean equals(Object o) {
         if (this == o) {
@@ -97,21 +61,20 @@ public class UIConstraint implements Serializable {
         }
         UIConstraint that = (UIConstraint) o;
         return Objects.equal(getServicePropertyName(), that.getServicePropertyName()) && Objects.equal(
-                getConstraintOperator(), that.getConstraintOperator()) && Objects.equal(getSourceType(),
-                that.getSourceType()) && Objects.equal(getSourceName(), that.getSourceName()) && Objects.equal(
-                getValue(), that.getValue());
+            getConstraintOperator(), that.getConstraintOperator()) && Objects.equal(getSourceType(),
+            that.getSourceType()) && Objects.equal(getSourceName(), that.getSourceName()) && Objects.equal(
+            getValue(), that.getValue());
     }
 
     @Override
     public int hashCode() {
-        return Objects.hashCode(getServicePropertyName(), getConstraintOperator(), getSourceType(), getSourceName(),
-                getValue());
+        return Objects.hashCode(servicePropertyName, constraintOperator, sourceType, sourceName, value);
     }
 
     @Override
     public String toString() {
         return MoreObjects.toStringHelper(this).add("servicePropertyName", servicePropertyName)
-                          .add("constraintOperator", constraintOperator).add("sourceType", sourceType)
-                          .add("sourceName", sourceName).add("value", value).toString();
+            .add("constraintOperator", constraintOperator).add("sourceType", sourceType)
+            .add("sourceName", sourceName).add("value", value).toString();
     }
 }
index 16ce3a8..84df74c 100644 (file)
 package org.openecomp.sdc.be.ui.model;
 
 import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
 
+@Getter
+@Setter
 public class UINodeFilter {
 
     private List<UIConstraint> properties;
 
-    public List<UIConstraint> getProperties() {
-        return properties;
-    }
-
-    public void setProperties(List<UIConstraint> properties) {
-        this.properties = properties;
-    }
 }
index 8bbe02e..99c0d33 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.openecomp.sdc.be.ui.model;
 
-import org.openecomp.sdc.be.model.category.CategoryDefinition;
-
 import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
+import org.openecomp.sdc.be.model.category.CategoryDefinition;
 
+@Getter
+@Setter
 public class UiCategories {
 
     private List<CategoryDefinition> resourceCategories;
     private List<CategoryDefinition> serviceCategories;
     private List<CategoryDefinition> productCategories;
 
-    public List<CategoryDefinition> getResourceCategories() {
-        return resourceCategories;
-    }
-    public void setResourceCategories(List<CategoryDefinition> resourceCategories) {
-        this.resourceCategories = resourceCategories;
-    }
-    public List<CategoryDefinition> getServiceCategories() {
-        return serviceCategories;
-    }
-    public void setServiceCategories(List<CategoryDefinition> serviceCategories) {
-        this.serviceCategories = serviceCategories;
-    }
-    public List<CategoryDefinition> getProductCategories() {
-        return productCategories;
-    }
-    public void setProductCategories(List<CategoryDefinition> productCategories) {
-        this.productCategories = productCategories;
-    }
 }
index c9a94ce..952f3b1 100644 (file)
 
 package org.openecomp.sdc.be.ui.model;
 
-import com.google.common.annotations.VisibleForTesting;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
 
+@Getter
+@AllArgsConstructor
 public class UiCombination {
 
-    String name;
-    String description;
+    private final String name;
+    private final String description;
 
-    @VisibleForTesting
-    UiCombination() {
-    }
-
-    public UiCombination(String name, String description) {
-        this.name = name;
-        this.description = description;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
 }
index 4272a5c..38d5a90 100644 (file)
 package org.openecomp.sdc.be.ui.model;
 
 
+import java.util.List;
+import java.util.Map;
+import lombok.Getter;
+import lombok.Setter;
 import org.openecomp.sdc.be.datatypes.elements.CINodeFilterDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.model.AdditionalInformationDefinition;
@@ -39,48 +43,31 @@ import org.openecomp.sdc.be.model.RequirementCapabilityRelDef;
 import org.openecomp.sdc.be.model.RequirementDefinition;
 import org.openecomp.sdc.be.model.category.CategoryDefinition;
 
-import java.util.List;
-import java.util.Map;
-
+@Getter
+@Setter
 public class UiComponentDataTransfer {
 
-
+    protected ComponentTypeEnum componentType;
+    protected List<AdditionalInformationDefinition> additionalInformation;
     private Map<String, ArtifactDefinition> artifacts;
     private Map<String, ArtifactDefinition> deploymentArtifacts;
     private Map<String, ArtifactDefinition> toscaArtifacts;
-
     private List<CategoryDefinition> categories;
-
     // User
     private String creatorUserId;
     private String creatorFullName;
     private String lastUpdaterUserId;
     private String lastUpdaterFullName;
-
-    protected ComponentTypeEnum componentType;
-
     private List<ComponentInstance> componentInstances;
-
     private List<RequirementCapabilityRelDef> componentInstancesRelations;
-
     private Map<String, List<ComponentInstanceInput>> componentInstancesInputs;
-
     private Map<String, List<ComponentInstanceProperty>> componentInstancesProperties;
-
     private Map<String, List<ComponentInstanceProperty>> componentInstancesAttributes;
-
     private Map<String, List<CapabilityDefinition>> capabilities;
-
     private List<PolicyDefinition> policies;
-
     private Map<String, List<RequirementDefinition>> requirements;
-
     private List<InputDefinition> inputs;
-
     private List<GroupDefinition> groups;
-
-    protected List<AdditionalInformationDefinition> additionalInformation;
-
     private Map<String, InterfaceDefinition> interfaces;
 
     private Map<String, CINodeFilterDataDefinition> nodeFilter;
@@ -89,246 +76,7 @@ public class UiComponentDataTransfer {
     private List<PropertyDefinition> properties;
     private Map<String, List<ComponentInstanceInterface>> componentInstancesInterfaces;
 
-    public Map<String, InterfaceDefinition> getInterfaces() {
-        return interfaces;
-    }
-
-    public void setInterfaces(Map<String, InterfaceDefinition> interfaces) {
-        this.interfaces = interfaces;
-    }
-
     public UiComponentDataTransfer() {
     }
 
-    public Map<String, ArtifactDefinition> getArtifacts() {
-        return artifacts;
-    }
-
-
-    public void setArtifacts(Map<String, ArtifactDefinition> artifacts) {
-        this.artifacts = artifacts;
-    }
-
-
-    public Map<String, ArtifactDefinition> getDeploymentArtifacts() {
-        return deploymentArtifacts;
-    }
-
-
-    public void setDeploymentArtifacts(Map<String, ArtifactDefinition> deploymentArtifacts) {
-        this.deploymentArtifacts = deploymentArtifacts;
-    }
-
-
-    public Map<String, ArtifactDefinition> getToscaArtifacts() {
-        return toscaArtifacts;
-    }
-
-
-    public void setToscaArtifacts(Map<String, ArtifactDefinition> toscaArtifacts) {
-        this.toscaArtifacts = toscaArtifacts;
-    }
-
-
-    public List<CategoryDefinition> getCategories() {
-        return categories;
-    }
-
-
-    public void setCategories(List<CategoryDefinition> categories) {
-        this.categories = categories;
-    }
-
-
-    public String getCreatorUserId() {
-        return creatorUserId;
-    }
-
-
-    public void setCreatorUserId(String creatorUserId) {
-        this.creatorUserId = creatorUserId;
-    }
-
-
-    public String getCreatorFullName() {
-        return creatorFullName;
-    }
-
-
-    public void setCreatorFullName(String creatorFullName) {
-        this.creatorFullName = creatorFullName;
-    }
-
-
-    public String getLastUpdaterUserId() {
-        return lastUpdaterUserId;
-    }
-
-
-    public void setLastUpdaterUserId(String lastUpdaterUserId) {
-        this.lastUpdaterUserId = lastUpdaterUserId;
-    }
-
-
-    public String getLastUpdaterFullName() {
-        return lastUpdaterFullName;
-    }
-
-
-    public void setLastUpdaterFullName(String lastUpdaterFullName) {
-        this.lastUpdaterFullName = lastUpdaterFullName;
-    }
-
-
-    public ComponentTypeEnum getComponentType() {
-        return componentType;
-    }
-
-
-    public void setComponentType(ComponentTypeEnum componentType) {
-        this.componentType = componentType;
-    }
-
-
-    public List<ComponentInstance> getComponentInstances() {
-        return componentInstances;
-    }
-
-
-    public void setComponentInstances(List<ComponentInstance> componentInstances) {
-        this.componentInstances = componentInstances;
-    }
-
-
-    public List<RequirementCapabilityRelDef> getComponentInstancesRelations() {
-        return componentInstancesRelations;
-    }
-
-
-    public void setComponentInstancesRelations(List<RequirementCapabilityRelDef> componentInstancesRelations) {
-        this.componentInstancesRelations = componentInstancesRelations;
-    }
-
-
-    public Map<String, List<ComponentInstanceInput>> getComponentInstancesInputs() {
-        return componentInstancesInputs;
-    }
-
-
-    public void setComponentInstancesInputs(Map<String, List<ComponentInstanceInput>> componentInstancesInputs) {
-        this.componentInstancesInputs = componentInstancesInputs;
-    }
-
-
-    public Map<String, List<ComponentInstanceProperty>> getComponentInstancesProperties() {
-        return componentInstancesProperties;
-    }
-
-
-    public void setComponentInstancesProperties(Map<String, List<ComponentInstanceProperty>> componentInstancesProperties) {
-        this.componentInstancesProperties = componentInstancesProperties;
-    }
-
-
-    public Map<String, List<ComponentInstanceProperty>> getComponentInstancesAttributes() {
-        return componentInstancesAttributes;
-    }
-
-
-    public void setComponentInstancesAttributes(
-            Map<String, List<ComponentInstanceProperty>> componentInstancesAttributes) {
-        this.componentInstancesAttributes = componentInstancesAttributes;
-    }
-
-
-    public Map<String, List<CapabilityDefinition>> getCapabilities() {
-        return capabilities;
-    }
-
-
-    public void setCapabilities(Map<String, List<CapabilityDefinition>> capabilities) {
-        this.capabilities = capabilities;
-    }
-
-
-    public Map<String, List<RequirementDefinition>> getRequirements() {
-        return requirements;
-    }
-
-
-    public void setRequirements(Map<String, List<RequirementDefinition>> requirements) {
-        this.requirements = requirements;
-    }
-
-
-    public List<InputDefinition> getInputs() {
-        return inputs;
-    }
-
-
-    public void setInputs(List<InputDefinition> inputs) {
-        this.inputs = inputs;
-    }
-
-
-    public List<GroupDefinition> getGroups() {
-        return groups;
-    }
-
-
-    public void setGroups(List<GroupDefinition> groups) {
-        this.groups = groups;
-    }
-
-
-    public List<AdditionalInformationDefinition> getAdditionalInformation() {
-        return additionalInformation;
-    }
-
-
-    public void setAdditionalInformation(List<AdditionalInformationDefinition> additionalInformation) {
-        this.additionalInformation = additionalInformation;
-    }
-
-    public List<PolicyDefinition> getPolicies() {
-        return policies;
-    }
-
-    public void setPolicies(List<PolicyDefinition> policies) {
-        this.policies = policies;
-    }
-
-    public Map<String, CINodeFilterDataDefinition> getNodeFilter() {
-        return nodeFilter;
-    }
-
-    public void setNodeFilter(Map<String, CINodeFilterDataDefinition> nodeFilter) {
-        this.nodeFilter = nodeFilter;
-    }
-
-    public Map<String, UINodeFilter> getNodeFilterData() {
-        return nodeFilterforNode;
-    }
-
-    public void setNodeFilterData(Map<String, UINodeFilter> nodeFilterforNode) {
-        this.nodeFilterforNode = nodeFilterforNode;
-    }
-
-    public List<PropertyDefinition> getProperties() {
-        return properties;
-    }
-
-    public void setProperties(List<PropertyDefinition> properties) {
-        this.properties = properties;
-    }
-
-    public Map<String, List<ComponentInstanceInterface>> getComponentInstancesInterfaces() {
-        return componentInstancesInterfaces;
-    }
-
-    public void setComponentInstancesInterfaces(
-            Map<String, List<ComponentInstanceInterface>> componentInstancesInterfaces) {
-        this.componentInstancesInterfaces = componentInstancesInterfaces;
-    }
-
 }
index d0c7874..2a7c036 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.openecomp.sdc.be.ui.model;
 
+import java.util.List;
+import java.util.Map;
+import lombok.Getter;
+import lombok.Setter;
 import org.openecomp.sdc.be.datatypes.components.ComponentMetadataDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.model.category.CategoryDefinition;
 
-import java.util.List;
-import java.util.Map;
-
+@Getter
+@Setter
 public abstract class UiComponentMetadata {
 
     private String uniqueId;
@@ -87,9 +90,10 @@ public abstract class UiComponentMetadata {
     private Long archiveTime;
     private Boolean isVspArchived;
 
-    public UiComponentMetadata(){}
+    public UiComponentMetadata() {
+    }
 
-    public UiComponentMetadata (List<CategoryDefinition> categories, ComponentMetadataDataDefinition metadata) {
+    public UiComponentMetadata(List<CategoryDefinition> categories, ComponentMetadataDataDefinition metadata) {
 
         this.uniqueId = metadata.getUniqueId();
         this.name = metadata.getName(); // archiveName
@@ -124,246 +128,4 @@ public abstract class UiComponentMetadata {
         this.isVspArchived = metadata.isVspArchived();
     }
 
-
-
-    public List<CategoryDefinition> getCategories() {
-        return categories;
-    }
-
-    public void setCategories(List<CategoryDefinition> categories) {
-        this.categories = categories;
-    }
-
-
-    public String getUniqueId() {
-        return uniqueId;
-    }
-
-    public void setUniqueId(String uniqueId) {
-        this.uniqueId = uniqueId;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public Boolean getIsHighestVersion() {
-        return isHighestVersion;
-    }
-
-    public void setIsHighestVersion(Boolean isHighestVersion) {
-        this.isHighestVersion = isHighestVersion;
-    }
-
-    public Long getCreationDate() {
-        return creationDate;
-    }
-
-    public void setCreationDate(Long creationDate) {
-        this.creationDate = creationDate;
-    }
-
-    public Long getLastUpdateDate() {
-        return lastUpdateDate;
-    }
-
-    public void setLastUpdateDate(Long lastUpdateDate) {
-        this.lastUpdateDate = lastUpdateDate;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public String getLifecycleState() {
-        return lifecycleState;
-    }
-
-    public void setLifecycleState(String state) {
-        this.lifecycleState = state;
-    }
-
-    public List<String> getTags() {
-        return tags;
-    }
-
-    public void setTags(List<String> tags) {
-        this.tags = tags;
-    }
-
-    public String getIcon() {
-        return icon;
-    }
-
-    public void setIcon(String icon) {
-        this.icon = icon;
-    }
-
-    public String getUUID() {
-        return UUID;
-    }
-
-    public void setUUID(String uUID) {
-        UUID = uUID;
-    }
-
-    public String getNormalizedName() {
-        return normalizedName;
-    }
-
-    public void setNormalizedName(String normalizedName) {
-        this.normalizedName = normalizedName;
-    }
-
-    public String getSystemName() {
-        return systemName;
-    }
-
-    public void setSystemName(String systemName) {
-        this.systemName = systemName;
-    }
-
-    public String getContactId() {
-        return contactId;
-    }
-
-    public void setContactId(String contactId) {
-        this.contactId = contactId;
-    }
-
-    public Map<String, String> getAllVersions() {
-        return allVersions;
-    }
-
-    public void setAllVersions(Map<String, String> allVersions) {
-        this.allVersions = allVersions;
-    }
-
-    public Boolean getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(Boolean isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-
-    public String getProjectCode() {
-        return projectCode;
-    }
-
-    public void setProjectCode(String projectCode) {
-        this.projectCode = projectCode;
-    }
-
-    public String getCsarUUID() {
-        return csarUUID;
-    }
-
-    public void setCsarUUID(String csarUUID) {
-        this.csarUUID = csarUUID;
-    }
-
-    public String getCsarVersion() {
-        return csarVersion;
-    }
-
-    public void setCsarVersion(String csarVersion) {
-        this.csarVersion = csarVersion;
-    }
-
-    public String getImportedToscaChecksum() {
-        return importedToscaChecksum;
-    }
-
-    public void setImportedToscaChecksum(String importedToscaChecksum) {
-        this.importedToscaChecksum = importedToscaChecksum;
-    }
-
-    public String getInvariantUUID() {
-        return invariantUUID;
-    }
-
-    public void setInvariantUUID(String invariantUUID) {
-        this.invariantUUID = invariantUUID;
-    }
-
-    public ComponentTypeEnum getComponentType() {
-        return componentType;
-    }
-
-    public void setComponentType(ComponentTypeEnum componentType) {
-        this.componentType = componentType;
-    }
-
-    public String getCreatorUserId() {
-        return creatorUserId;
-    }
-
-    public void setCreatorUserId(String creatorUserId) {
-        this.creatorUserId = creatorUserId;
-    }
-
-    public String getCreatorFullName() {
-        return creatorFullName;
-    }
-
-    public void setCreatorFullName(String creatorFullName) {
-        this.creatorFullName = creatorFullName;
-    }
-
-    public String getLastUpdaterUserId() {
-        return lastUpdaterUserId;
-    }
-
-    public void setLastUpdaterUserId(String lastUpdaterUserId) {
-        this.lastUpdaterUserId = lastUpdaterUserId;
-    }
-
-    public String getLastUpdaterFullName() {
-        return lastUpdaterFullName;
-    }
-
-    public void setLastUpdaterFullName(String lastUpdaterFullName) {
-        this.lastUpdaterFullName = lastUpdaterFullName;
-    }
-
-    public Boolean isArchived() {
-        return isArchived;
-    }
-
-    public void setArchived(Boolean archived) {
-        isArchived = archived;
-    }
-
-    public Long getArchiveTime() {
-        return archiveTime;
-    }
-
-    public void setArchiveTime(Long archiveTime) {
-        this.archiveTime = archiveTime;
-    }
-
-    public Boolean isVspArchived() {
-        return isVspArchived;
-    }
-
-    public void setVspArchived(Boolean vspArchived) {
-        isVspArchived = vspArchived;
-    }
 }
index b0b01fa..d51298b 100644 (file)
 package org.openecomp.sdc.be.ui.model;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.List;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.model.Component;
 import org.openecomp.sdc.be.model.category.CategoryDefinition;
 import org.openecomp.sdc.common.util.ICategorizedElement;
 
-import java.util.List;
-
 public class UiLeftPaletteComponent implements ICategorizedElement {
-    private String uniqueId;
-    private String name; // archiveName
-    private String version; // archiveVersion
-    private String description;
-    private List<String> tags;
-    private String icon;
-    private String UUID;
-    private String systemName;
-    private String invariantUUID;
-    private ComponentTypeEnum componentType;
-    private String resourceType;
-    private String categoryName;
-    private String subCategoryName;
-    private String searchFilterTerms;
-    private List<CategoryDefinition> categories;
 
-    public UiLeftPaletteComponent(Component component) {
+    private final String uniqueId;
+    private final String name; // archiveName
+    private final String version; // archiveVersion
+    private final String description;
+    private final List<String> tags;
+    private final String icon;
+    private final String UUID;
+    private final String systemName;
+    private final String invariantUUID;
+    private final ComponentTypeEnum componentType;
+    private final String resourceType;
+    private final String categoryName;
+    private final String subCategoryName;
+    private final String searchFilterTerms;
+    private final List<CategoryDefinition> categories;
+
+    public UiLeftPaletteComponent(final Component component) {
         this.uniqueId = component.getUniqueId();
         this.name = component.getName();
         this.version = component.getVersion();
@@ -60,88 +60,31 @@ public class UiLeftPaletteComponent implements ICategorizedElement {
         this.categories = component.getCategories();
         this.categoryName = getCategoryName();
         this.subCategoryName = getSubcategoryName();
-        String tagString = convertListResultToString(tags);
-        setSearchFilterTerms(name + " " + description + " " + tagString + version);
-        this.searchFilterTerms = getSearchFilterTerms();
+        this.searchFilterTerms = (name + " " + description + " " + convertListResultToString(tags) + version);
     }
 
-    private String convertListResultToString(List<String> tags) {
-        StringBuilder sb = new StringBuilder();
-        tags.forEach(t->sb.append(t + " "));
+    private String convertListResultToString(final List<String> tags) {
+        final StringBuilder sb = new StringBuilder();
+        tags.forEach(t -> sb.append(t + " "));
         return sb.toString().toLowerCase();
     }
 
-    public String getUniqueId() {
-        return uniqueId;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public List<String> getTags() {
-        return tags;
-    }
-    public String getIcon() {
-        return icon;
-    }
-
-    public String getUUID() {
-        return UUID;
-    }
-
-    public String getSystemName() {
-        return systemName;
-    }
-
-    public String getInvariantUUID() {
-        return invariantUUID;
-    }
-
-    public ComponentTypeEnum getComponentType() {
-        return componentType;
-    }
-
-    public String getResourceType() {
-        return resourceType;
-    }
-
-    public List<CategoryDefinition> getCategories() {
-        return categories;
-    }
-
-    public String getSearchFilterTerms() {
-        return searchFilterTerms;
-    }
-
-    public void setSearchFilterTerms(String searchFilterTerms) {
-        this.searchFilterTerms = searchFilterTerms;
-    }
-
     @JsonIgnore
     @Override
     public String getComponentTypeAsString() {
-        return getComponentType().name();
+        return componentType.name();
     }
 
     @JsonIgnore
     public String getCategoryName() {
-        return getCategories().get(0).getName();
+        return categories.get(0).getName();
     }
 
     @JsonIgnore
     public String getSubcategoryName() {
-        if(componentType == ComponentTypeEnum.SERVICE){
+        if (componentType == ComponentTypeEnum.SERVICE) {
             return null;
         }
-        return getCategories().get(0).getSubcategories().get(0).getName();
+        return categories.get(0).getSubcategories().get(0).getName();
     }
 }
index b3c3b67..380593b 100644 (file)
 
 package org.openecomp.sdc.be.ui.model;
 
-import org.openecomp.sdc.be.model.AdditionalInformationDefinition;
-import org.openecomp.sdc.be.model.InterfaceDefinition;
-import org.openecomp.sdc.be.model.PropertyDefinition;
-
 import java.util.List;
 import java.util.Map;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.openecomp.sdc.be.model.InterfaceDefinition;
+import org.openecomp.sdc.be.model.PropertyDefinition;
 
-public class UiResourceDataTransfer extends UiComponentDataTransfer{
+@Getter
+@Setter
+@NoArgsConstructor
+public class UiResourceDataTransfer extends UiComponentDataTransfer {
 
     private UiResourceMetadata metadata;
 
@@ -43,70 +47,4 @@ public class UiResourceDataTransfer extends UiComponentDataTransfer{
 
     private List<String> defaultCapabilities;
 
-
-    public UiResourceDataTransfer(){}
-
-    public List<AdditionalInformationDefinition> getAdditionalInformation() {
-        return additionalInformation;
-    }
-
-    public void setAdditionalInformation(List<AdditionalInformationDefinition> additionalInformation) {
-        this.additionalInformation = additionalInformation;
-    }
-
-    public UiResourceMetadata getMetadata() {
-        return metadata;
-    }
-
-    public void setMetadata(UiResourceMetadata metadata) {
-        this.metadata = metadata;
-    }
-
-    public List<String> getDerivedFrom() {
-        return derivedFrom;
-    }
-
-    public void setDerivedFrom(List<String> derivedFrom) {
-        this.derivedFrom = derivedFrom;
-    }
-
-    public List<String> getDerivedList() {
-        return derivedList;
-    }
-
-    public void setDerivedList(List<String> derivedList) {
-        this.derivedList = derivedList;
-    }
-
-    public List<PropertyDefinition> getProperties() {
-        return properties;
-    }
-
-    public void setProperties(List<PropertyDefinition> properties) {
-        this.properties = properties;
-    }
-
-    public List<PropertyDefinition> getAttributes() {
-        return attributes;
-    }
-
-    public void setAttributes(List<PropertyDefinition> attributes) {
-        this.attributes = attributes;
-    }
-
-    public Map<String, InterfaceDefinition> getInterfaces() {
-        return interfaces;
-    }
-
-    public void setInterfaces(Map<String, InterfaceDefinition> interfaces) {
-        this.interfaces = interfaces;
-    }
-
-    public List<String> getDefaultCapabilities() {
-        return defaultCapabilities;
-    }
-
-    public void setDefaultCapabilities(List<String> defaultCapabilities) {
-        this.defaultCapabilities = defaultCapabilities;
-    }
 }
index d84ce25..c8d7bdf 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.openecomp.sdc.be.ui.model;
 
+import java.util.List;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
 import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
 import org.openecomp.sdc.be.model.category.CategoryDefinition;
 
-import java.util.List;
-
+@Getter
+@Setter
+@NoArgsConstructor
 public class UiResourceMetadata extends UiComponentMetadata {
 
     private String vendorName;
@@ -39,7 +44,8 @@ public class UiResourceMetadata extends UiComponentMetadata {
     private List<String> derivedFrom;
 
 
-    public UiResourceMetadata(List<CategoryDefinition> categories, List<String> derivedFrom, ResourceMetadataDataDefinition metadata) {
+    public UiResourceMetadata(List<CategoryDefinition> categories, List<String> derivedFrom,
+                              ResourceMetadataDataDefinition metadata) {
         super(categories, metadata);
         this.vendorName = metadata.getVendorName();
         this.vendorRelease = metadata.getVendorRelease();
@@ -51,84 +57,6 @@ public class UiResourceMetadata extends UiComponentMetadata {
         this.derivedFrom = derivedFrom;
     }
 
-    public UiResourceMetadata(){}
-
-    public List<String> getDerivedFrom() {
-        return derivedFrom;
-    }
-
-
-    public void setDerivedFrom(List<String> derivedFrom) {
-        this.derivedFrom = derivedFrom;
-    }
-
-
-    public String getVendorName() {
-        return vendorName;
-    }
-
-    public void setVendorName(String vendorName) {
-        this.vendorName = vendorName;
-    }
-
-    public String getVendorRelease() {
-        return vendorRelease;
-    }
-
-    public void setVendorRelease(String vendorRelease) {
-        this.vendorRelease = vendorRelease;
-    }
-
-    public String getResourceVendorModelNumber() {
-        return resourceVendorModelNumber;
-    }
-
-    public void setResourceVendorModelNumber(String resourceVendorModelNumber) {
-        this.resourceVendorModelNumber = resourceVendorModelNumber;
-    }
-
-    public ResourceTypeEnum getResourceType() {
-        return resourceType;
-    }
-
-    public void setResourceType(ResourceTypeEnum resourceType) {
-        this.resourceType = resourceType;
-    }
-
-    public Boolean getIsAbstract() {
-        return isAbstract;
-    }
-
-    public void setIsAbstract(Boolean isAbstract) {
-        this.isAbstract = isAbstract;
-    }
-
-    public String getCost() {
-        return cost;
-    }
-
-    public void setCost(String cost) {
-        this.cost = cost;
-    }
-
-    public String getLicenseType() {
-        return licenseType;
-    }
-
-    public void setLicenseType(String licenseType) {
-        this.licenseType = licenseType;
-    }
-
-    public String getToscaResourceName() {
-        return toscaResourceName;
-    }
-
-    public void setToscaResourceName(String toscaResourceName) {
-        this.toscaResourceName = toscaResourceName;
-    }
-
-
-
 }
 
 
index b2c2f7a..cee7cf0 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.openecomp.sdc.be.ui.model;
 
+import java.util.Map;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
 import org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition;
 import org.openecomp.sdc.be.model.ArtifactDefinition;
 
-import java.util.Map;
+@Getter
+@Setter
+@NoArgsConstructor
 public class UiServiceDataTransfer extends UiComponentDataTransfer {
 
-
     private Map<String, ArtifactDefinition> serviceApiArtifacts;
     private Map<String, ForwardingPathDataDefinition> forwardingPaths;
     private UiServiceMetadata metadata;
 
-    public UiServiceMetadata getMetadata() {
-        return metadata;
-    }
-
-    public void setMetadata(UiServiceMetadata metadata) {
-        this.metadata = metadata;
-    }
-
-    public Map<String, ArtifactDefinition> getServiceApiArtifacts() {
-        return serviceApiArtifacts;
-    }
-
-    public void setServiceApiArtifacts(Map<String, ArtifactDefinition> serviceApiArtifacts) {
-        this.serviceApiArtifacts = serviceApiArtifacts;
-    }
-
-    public java.util.Map<String, org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition> getForwardingPaths() {
-        return forwardingPaths;
-    }
-
-    public void setForwardingPaths(java.util.Map<String, org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition> forwardingPaths) {
-        this.forwardingPaths = forwardingPaths;
-    }
 }
index 454e970..e1fe587 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.openecomp.sdc.be.ui.model;
 
+import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
 import org.openecomp.sdc.be.datatypes.components.ServiceMetadataDataDefinition;
 import org.openecomp.sdc.be.model.category.CategoryDefinition;
 
-import java.util.List;
-
+@Getter
+@Setter
 public class UiServiceMetadata extends UiComponentMetadata {
-       
-       private String distributionStatus;
-       private Boolean ecompGeneratedNaming;
-       private String namingPolicy;
-       private String serviceType;
-       private String serviceRole;
-       private String environmentContext;
-       private String instantiationType;
-       private String serviceFunction;
-
-       public UiServiceMetadata(List<CategoryDefinition> categories, ServiceMetadataDataDefinition metadata) {
-               super(categories, metadata);
-               this.distributionStatus = metadata.getDistributionStatus();
-               this.ecompGeneratedNaming = metadata.isEcompGeneratedNaming();
-               this.namingPolicy = metadata.getNamingPolicy();
-               this.serviceType = metadata.getServiceType();
-               this.serviceRole = metadata.getServiceRole();
-               this.environmentContext = metadata.getEnvironmentContext();
-               this.instantiationType = metadata.getInstantiationType();
-               this.serviceFunction = metadata.getServiceFunction();
-       }
-       
-       public String getDistributionStatus() {
-               return distributionStatus;
-       }
-
-    public void setDistributionStatus(String distributionStatus) {
-        this.distributionStatus = distributionStatus;
-    }
-
-    public Boolean getEcompGeneratedNaming() {
-        return ecompGeneratedNaming;
-    }
-
-    public void setEcompGeneratedNaming(Boolean ecompGeneratedNaming) {
-        this.ecompGeneratedNaming = ecompGeneratedNaming;
-    }
-
-    public String getNamingPolicy() {
-        return namingPolicy;
-    }
 
-    public void setNamingPolicy(String namingPolicy) {
-        this.namingPolicy = namingPolicy;
+    private String distributionStatus;
+    private Boolean ecompGeneratedNaming;
+    private String namingPolicy;
+    private String serviceType;
+    private String serviceRole;
+    private String environmentContext;
+    private String instantiationType;
+    private String serviceFunction;
+
+    public UiServiceMetadata(List<CategoryDefinition> categories, ServiceMetadataDataDefinition metadata) {
+        super(categories, metadata);
+        this.distributionStatus = metadata.getDistributionStatus();
+        this.ecompGeneratedNaming = metadata.isEcompGeneratedNaming();
+        this.namingPolicy = metadata.getNamingPolicy();
+        this.serviceType = metadata.getServiceType();
+        this.serviceRole = metadata.getServiceRole();
+        this.environmentContext = metadata.getEnvironmentContext();
+        this.instantiationType = metadata.getInstantiationType();
+        this.serviceFunction = metadata.getServiceFunction();
     }
 
-    public String getServiceType() {
-        return serviceType;
-    }
-
-    public void setServiceType(String serviceType) {
-        this.serviceType = serviceType;
-    }
-
-    public String getServiceRole() {
-        return serviceRole;
-    }
-
-       public void setServiceRole(String serviceRole) {
-               this.serviceRole = serviceRole;
-       }
-
-       public String getInstantiationType() {
-               return instantiationType;
-       }
-
-       public void setInstantiationType(String instantiationType) {
-               this.instantiationType = instantiationType;
-       }
-
-    public String getEnvironmentContext() { return environmentContext; }
-
-    public void setEnvironmentContext(String environmentContext) { this.environmentContext = environmentContext; }
-
-       public String getServiceFunction() {
-               return serviceFunction;
-       }
-
-       public void setServiceFunction(String serviceFunction) {
-               this.serviceFunction = serviceFunction;
-       }
 }
index e95fc85..7fd473a 100644 (file)
  */
 package org.openecomp.sdc.be.ui.model;
 
-import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
-import static org.hamcrest.MatcherAssert.assertThat;
-
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 
 public class UIConstraintTest {
+
+    private UIConstraint createTestSubject() {
+        return new UIConstraint();
+    }
+
     @Test
-    public void shouldHaveValidGettersAndSetters() {
-        assertThat(UIConstraint.class, hasValidGettersAndSetters());
+    public void testCtor() throws Exception {
+        final UIConstraint testSubject = createTestSubject();
+        Assertions.assertThat(testSubject).isNotNull().isInstanceOf(UIConstraint.class);
     }
+
+    @Test
+    public void testCtorX4() throws Exception {
+        final UIConstraint testSubject =
+            new UIConstraint("servicePropertyName", "constraintOperator", "sourceType", "value");
+        Assertions.assertThat(testSubject).isNotNull().isInstanceOf(UIConstraint.class);
+    }
+
+    @Test
+    public void testCtorX5() throws Exception {
+        final UIConstraint testSubject =
+            new UIConstraint("servicePropertyName", "constraintOperator", "sourceType", "sourceName", "value");
+        Assertions.assertThat(testSubject).isNotNull().isInstanceOf(UIConstraint.class);
+    }
+
 }
\ No newline at end of file
index 8f767fe..0f3dc79 100644 (file)
  */
 package org.openecomp.sdc.be.ui.model;
 
-import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
-import static org.hamcrest.MatcherAssert.assertThat;
-
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 
 public class UINodeFilterTest {
+
+    private UINodeFilter createTestSubject() {
+        return new UINodeFilter();
+    }
+
     @Test
-    public void shouldHaveValidGettersAndSetters() {
-        assertThat(UINodeFilter.class, hasValidGettersAndSetters());
+    public void testCtor() throws Exception {
+        final UINodeFilter testSubject = createTestSubject();
+        Assertions.assertThat(testSubject).isNotNull().isInstanceOf(UINodeFilter.class);
     }
+
 }
\ No newline at end of file
index 1108289..8e492d6 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.openecomp.sdc.be.ui.model;
 
-import java.util.List;
+import static org.assertj.core.api.Assertions.assertThat;
 
 import org.junit.Test;
-import org.openecomp.sdc.be.model.category.CategoryDefinition;
-
 
 public class UiCategoriesTest {
 
-       private UiCategories createTestSubject() {
-               return new UiCategories();
-       }
-
-       
-       @Test
-       public void testGetResourceCategories() throws Exception {
-               UiCategories testSubject;
-               List<CategoryDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getResourceCategories();
-       }
-
-       
-       @Test
-       public void testSetResourceCategories() throws Exception {
-               UiCategories testSubject;
-               List<CategoryDefinition> resourceCategories = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setResourceCategories(resourceCategories);
-       }
-
-       
-       @Test
-       public void testGetServiceCategories() throws Exception {
-               UiCategories testSubject;
-               List<CategoryDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getServiceCategories();
-       }
-
-       
-       @Test
-       public void testSetServiceCategories() throws Exception {
-               UiCategories testSubject;
-               List<CategoryDefinition> serviceCategories = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setServiceCategories(serviceCategories);
-       }
-
-       
-       @Test
-       public void testGetProductCategories() throws Exception {
-               UiCategories testSubject;
-               List<CategoryDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getProductCategories();
-       }
+    private UiCategories createTestSubject() {
+        return new UiCategories();
+    }
 
-       
-       @Test
-       public void testSetProductCategories() throws Exception {
-               UiCategories testSubject;
-               List<CategoryDefinition> productCategories = null;
+    @Test
+    public void testCtor() throws Exception {
+        final UiCategories testSubject = createTestSubject();
+        assertThat(testSubject).isNotNull().isInstanceOf(UiCategories.class);
+    }
 
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setProductCategories(productCategories);
-       }
 }
index 3bce3fd..d34577a 100644 (file)
  */
 package org.openecomp.sdc.be.ui.model;
 
-import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
-import static org.hamcrest.MatcherAssert.assertThat;
-
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 
 public class UiCombinationTest {
+
+    private UiCombination createTestSubject() {
+        return new UiCombination("NAME", "DESC");
+    }
+
     @Test
-    public void shouldHaveValidGettersAndSetters() {
-        assertThat(UiCombination.class, hasValidGettersAndSetters());
+    public void testCtor() throws Exception {
+        final UiCombination testSubject = createTestSubject();
+        Assertions.assertThat(testSubject).isNotNull().isInstanceOf(UiCombination.class);
     }
+
 }
\ No newline at end of file
index 758250d..5a67f55 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.openecomp.sdc.be.ui.model;
 
-import java.util.List;
-import java.util.Map;
-
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
-import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
-import org.openecomp.sdc.be.model.AdditionalInformationDefinition;
-import org.openecomp.sdc.be.model.ArtifactDefinition;
-import org.openecomp.sdc.be.model.CapabilityDefinition;
-import org.openecomp.sdc.be.model.ComponentInstance;
-import org.openecomp.sdc.be.model.ComponentInstanceInput;
-import org.openecomp.sdc.be.model.ComponentInstanceProperty;
-import org.openecomp.sdc.be.model.GroupDefinition;
-import org.openecomp.sdc.be.model.InputDefinition;
-import org.openecomp.sdc.be.model.RequirementCapabilityRelDef;
-import org.openecomp.sdc.be.model.RequirementDefinition;
-import org.openecomp.sdc.be.model.category.CategoryDefinition;
-
 
 public class UiComponentDataTransferTest {
 
-       private UiComponentDataTransfer createTestSubject() {
-               return new UiComponentDataTransfer();
-       }
-
-       
-       @Test
-       public void testGetArtifacts() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, ArtifactDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getArtifacts();
-       }
-
-       
-       @Test
-       public void testSetArtifacts() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, ArtifactDefinition> artifacts = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setArtifacts(artifacts);
-       }
-
-       
-       @Test
-       public void testGetDeploymentArtifacts() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, ArtifactDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getDeploymentArtifacts();
-       }
-
-       
-       @Test
-       public void testSetDeploymentArtifacts() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, ArtifactDefinition> deploymentArtifacts = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setDeploymentArtifacts(deploymentArtifacts);
-       }
-
-       
-       @Test
-       public void testGetToscaArtifacts() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, ArtifactDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getToscaArtifacts();
-       }
-
-       
-       @Test
-       public void testSetToscaArtifacts() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, ArtifactDefinition> toscaArtifacts = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setToscaArtifacts(toscaArtifacts);
-       }
-
-       
-       @Test
-       public void testGetCategories() throws Exception {
-               UiComponentDataTransfer testSubject;
-               List<CategoryDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getCategories();
-       }
-
-       
-       @Test
-       public void testSetCategories() throws Exception {
-               UiComponentDataTransfer testSubject;
-               List<CategoryDefinition> categories = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setCategories(categories);
-       }
-
-       
-       @Test
-       public void testGetCreatorUserId() throws Exception {
-               UiComponentDataTransfer testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getCreatorUserId();
-       }
-
-       
-       @Test
-       public void testSetCreatorUserId() throws Exception {
-               UiComponentDataTransfer testSubject;
-               String creatorUserId = "";
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setCreatorUserId(creatorUserId);
-       }
-
-       
-       @Test
-       public void testGetCreatorFullName() throws Exception {
-               UiComponentDataTransfer testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getCreatorFullName();
-       }
-
-       
-       @Test
-       public void testSetCreatorFullName() throws Exception {
-               UiComponentDataTransfer testSubject;
-               String creatorFullName = "";
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setCreatorFullName(creatorFullName);
-       }
-
-       
-       @Test
-       public void testGetLastUpdaterUserId() throws Exception {
-               UiComponentDataTransfer testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getLastUpdaterUserId();
-       }
-
-       
-       @Test
-       public void testSetLastUpdaterUserId() throws Exception {
-               UiComponentDataTransfer testSubject;
-               String lastUpdaterUserId = "";
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setLastUpdaterUserId(lastUpdaterUserId);
-       }
-
-       
-       @Test
-       public void testGetLastUpdaterFullName() throws Exception {
-               UiComponentDataTransfer testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getLastUpdaterFullName();
-       }
-
-       
-       @Test
-       public void testSetLastUpdaterFullName() throws Exception {
-               UiComponentDataTransfer testSubject;
-               String lastUpdaterFullName = "";
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setLastUpdaterFullName(lastUpdaterFullName);
-       }
-
-       
-       @Test
-       public void testGetComponentType() throws Exception {
-               UiComponentDataTransfer testSubject;
-               ComponentTypeEnum result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getComponentType();
-       }
-
-       
-       @Test
-       public void testSetComponentType() throws Exception {
-               UiComponentDataTransfer testSubject;
-               ComponentTypeEnum componentType = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setComponentType(componentType);
-       }
-
-       
-       @Test
-       public void testGetComponentInstances() throws Exception {
-               UiComponentDataTransfer testSubject;
-               List<ComponentInstance> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getComponentInstances();
-       }
-
-       
-       @Test
-       public void testSetComponentInstances() throws Exception {
-               UiComponentDataTransfer testSubject;
-               List<ComponentInstance> componentInstances = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setComponentInstances(componentInstances);
-       }
-
-       
-       @Test
-       public void testGetComponentInstancesRelations() throws Exception {
-               UiComponentDataTransfer testSubject;
-               List<RequirementCapabilityRelDef> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getComponentInstancesRelations();
-       }
-
-       
-       @Test
-       public void testSetComponentInstancesRelations() throws Exception {
-               UiComponentDataTransfer testSubject;
-               List<RequirementCapabilityRelDef> componentInstancesRelations = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setComponentInstancesRelations(componentInstancesRelations);
-       }
-
-       
-       @Test
-       public void testGetComponentInstancesInputs() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, List<ComponentInstanceInput>> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getComponentInstancesInputs();
-       }
-
-       
-       @Test
-       public void testSetComponentInstancesInputs() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, List<ComponentInstanceInput>> componentInstancesInputs = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setComponentInstancesInputs(componentInstancesInputs);
-       }
-
-       
-       @Test
-       public void testGetComponentInstancesProperties() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, List<ComponentInstanceProperty>> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getComponentInstancesProperties();
-       }
-
-       
-       @Test
-       public void testSetComponentInstancesProperties() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, List<ComponentInstanceProperty>> componentInstancesProperties = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setComponentInstancesProperties(componentInstancesProperties);
-       }
-
-       
-       @Test
-       public void testGetComponentInstancesAttributes() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, List<ComponentInstanceProperty>> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getComponentInstancesAttributes();
-       }
-
-       
-       @Test
-       public void testSetComponentInstancesAttributes() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, List<ComponentInstanceProperty>> componentInstancesAttributes = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setComponentInstancesAttributes(componentInstancesAttributes);
-       }
-
-       
-       @Test
-       public void testGetCapabilities() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, List<CapabilityDefinition>> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getCapabilities();
-       }
-
-       
-       @Test
-       public void testSetCapabilities() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, List<CapabilityDefinition>> capabilities = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setCapabilities(capabilities);
-       }
-
-       
-       @Test
-       public void testGetRequirements() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, List<RequirementDefinition>> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getRequirements();
-       }
-
-       
-       @Test
-       public void testSetRequirements() throws Exception {
-               UiComponentDataTransfer testSubject;
-               Map<String, List<RequirementDefinition>> requirements = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setRequirements(requirements);
-       }
-
-       
-       @Test
-       public void testGetInputs() throws Exception {
-               UiComponentDataTransfer testSubject;
-               List<InputDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getInputs();
-       }
-
-       
-       @Test
-       public void testSetInputs() throws Exception {
-               UiComponentDataTransfer testSubject;
-               List<InputDefinition> inputs = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setInputs(inputs);
-       }
-
-       
-       @Test
-       public void testGetGroups() throws Exception {
-               UiComponentDataTransfer testSubject;
-               List<GroupDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getGroups();
-       }
-
-       
-       @Test
-       public void testSetGroups() throws Exception {
-               UiComponentDataTransfer testSubject;
-               List<GroupDefinition> groups = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setGroups(groups);
-       }
-
-       
-       @Test
-       public void testGetAdditionalInformation() throws Exception {
-               UiComponentDataTransfer testSubject;
-               List<AdditionalInformationDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getAdditionalInformation();
-       }
+    private UiComponentDataTransfer createTestSubject() {
+        return new UiComponentDataTransfer();
+    }
 
-       
-       @Test
-       public void testSetAdditionalInformation() throws Exception {
-               UiComponentDataTransfer testSubject;
-               List<AdditionalInformationDefinition> additionalInformation = null;
+    @Test
+    public void testCtor() throws Exception {
+        final UiComponentDataTransfer testSubject = createTestSubject();
+        Assertions.assertThat(testSubject).isNotNull().isInstanceOf(UiComponentDataTransfer.class);
+    }
 
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setAdditionalInformation(additionalInformation);
-       }
 }
index 55cd4e9..b44cbd0 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.openecomp.sdc.be.ui.model;
 
-import java.util.List;
-import java.util.Map;
-
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
-import org.openecomp.sdc.be.model.AdditionalInformationDefinition;
-import org.openecomp.sdc.be.model.InterfaceDefinition;
-import org.openecomp.sdc.be.model.PropertyDefinition;
 
 
 public class UiResourceDataTransferTest {
 
-       private UiResourceDataTransfer createTestSubject() {
-               return new UiResourceDataTransfer();
-       }
-
-       
-       @Test
-       public void testGetAdditionalInformation() throws Exception {
-               UiResourceDataTransfer testSubject;
-               List<AdditionalInformationDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getAdditionalInformation();
-       }
-
-       
-       @Test
-       public void testSetAdditionalInformation() throws Exception {
-               UiResourceDataTransfer testSubject;
-               List<AdditionalInformationDefinition> additionalInformation = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setAdditionalInformation(additionalInformation);
-       }
-
-       
-       @Test
-       public void testGetMetadata() throws Exception {
-               UiResourceDataTransfer testSubject;
-               UiResourceMetadata result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getMetadata();
-       }
-
-       
-       @Test
-       public void testSetMetadata() throws Exception {
-               UiResourceDataTransfer testSubject;
-               UiResourceMetadata metadata = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setMetadata(metadata);
-       }
-
-       
-       @Test
-       public void testGetDerivedFrom() throws Exception {
-               UiResourceDataTransfer testSubject;
-               List<String> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getDerivedFrom();
-       }
-
-       
-       @Test
-       public void testSetDerivedFrom() throws Exception {
-               UiResourceDataTransfer testSubject;
-               List<String> derivedFrom = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setDerivedFrom(derivedFrom);
-       }
-
-       
-       @Test
-       public void testGetDerivedList() throws Exception {
-               UiResourceDataTransfer testSubject;
-               List<String> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getDerivedList();
-       }
-
-       
-       @Test
-       public void testSetDerivedList() throws Exception {
-               UiResourceDataTransfer testSubject;
-               List<String> derivedList = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setDerivedList(derivedList);
-       }
-
-       
-       @Test
-       public void testGetProperties() throws Exception {
-               UiResourceDataTransfer testSubject;
-               List<PropertyDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getProperties();
-       }
-
-       
-       @Test
-       public void testSetProperties() throws Exception {
-               UiResourceDataTransfer testSubject;
-               List<PropertyDefinition> properties = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setProperties(properties);
-       }
-
-       
-       @Test
-       public void testGetAttributes() throws Exception {
-               UiResourceDataTransfer testSubject;
-               List<PropertyDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getAttributes();
-       }
-
-       
-       @Test
-       public void testSetAttributes() throws Exception {
-               UiResourceDataTransfer testSubject;
-               List<PropertyDefinition> attributes = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setAttributes(attributes);
-       }
-
-       
-       @Test
-       public void testGetInterfaces() throws Exception {
-               UiResourceDataTransfer testSubject;
-               Map<String, InterfaceDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getInterfaces();
-       }
-
-       
-       @Test
-       public void testSetInterfaces() throws Exception {
-               UiResourceDataTransfer testSubject;
-               Map<String, InterfaceDefinition> interfaces = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setInterfaces(interfaces);
-       }
-
-       
-       @Test
-       public void testGetDefaultCapabilities() throws Exception {
-               UiResourceDataTransfer testSubject;
-               List<String> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getDefaultCapabilities();
-       }
-
-       
-       @Test
-       public void testSetDefaultCapabilities() throws Exception {
-               UiResourceDataTransfer testSubject;
-               List<String> defaultCapabilities = null;
+    private UiResourceDataTransfer createTestSubject() {
+        return new UiResourceDataTransfer();
+    }
 
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setDefaultCapabilities(defaultCapabilities);
-       }
+    @Test
+    public void testCtor() throws Exception {
+        final UiResourceDataTransfer testSubject = createTestSubject();
+        Assertions.assertThat(testSubject).isNotNull().isInstanceOf(UiResourceDataTransfer.class);
+    }
 }
index 5aef125..d548d76 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.openecomp.sdc.be.ui.model;
 
-import java.util.List;
-
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.openecomp.sdc.be.datatypes.components.ResourceMetadataDataDefinition;
-import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
 
 
 public class UiResourceMetadataTest {
 
-       private UiResourceMetadata createTestSubject() {
-               return new UiResourceMetadata(null, null, new ResourceMetadataDataDefinition());
-       }
-
-       
-       @Test
-       public void testGetDerivedFrom() throws Exception {
-               UiResourceMetadata testSubject;
-               List<String> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getDerivedFrom();
-       }
-
-       
-       @Test
-       public void testSetDerivedFrom() throws Exception {
-               UiResourceMetadata testSubject;
-               List<String> derivedFrom = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setDerivedFrom(derivedFrom);
-       }
-
-       
-       @Test
-       public void testGetVendorName() throws Exception {
-               UiResourceMetadata testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getVendorName();
-       }
-
-       
-       @Test
-       public void testSetVendorName() throws Exception {
-               UiResourceMetadata testSubject;
-               String vendorName = "";
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setVendorName(vendorName);
-       }
-
-       
-       @Test
-       public void testGetVendorRelease() throws Exception {
-               UiResourceMetadata testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getVendorRelease();
-       }
-
-       
-       @Test
-       public void testSetVendorRelease() throws Exception {
-               UiResourceMetadata testSubject;
-               String vendorRelease = "";
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setVendorRelease(vendorRelease);
-       }
-
-       
-       @Test
-       public void testGetResourceVendorModelNumber() throws Exception {
-               UiResourceMetadata testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getResourceVendorModelNumber();
-       }
-
-       
-       @Test
-       public void testSetResourceVendorModelNumber() throws Exception {
-               UiResourceMetadata testSubject;
-               String resourceVendorModelNumber = "";
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setResourceVendorModelNumber(resourceVendorModelNumber);
-       }
-
-       
-       @Test
-       public void testGetResourceType() throws Exception {
-               UiResourceMetadata testSubject;
-               ResourceTypeEnum result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getResourceType();
-       }
-
-       
-       @Test
-       public void testSetResourceType() throws Exception {
-               UiResourceMetadata testSubject;
-               ResourceTypeEnum resourceType = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setResourceType(resourceType);
-       }
-
-       
-       @Test
-       public void testGetIsAbstract() throws Exception {
-               UiResourceMetadata testSubject;
-               Boolean result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getIsAbstract();
-       }
-
-       
-       @Test
-       public void testSetIsAbstract() throws Exception {
-               UiResourceMetadata testSubject;
-               Boolean isAbstract = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setIsAbstract(isAbstract);
-       }
-
-       
-       @Test
-       public void testGetCost() throws Exception {
-               UiResourceMetadata testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getCost();
-       }
-
-       
-       @Test
-       public void testSetCost() throws Exception {
-               UiResourceMetadata testSubject;
-               String cost = "";
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setCost(cost);
-       }
-
-       
-       @Test
-       public void testGetLicenseType() throws Exception {
-               UiResourceMetadata testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getLicenseType();
-       }
-
-       
-       @Test
-       public void testSetLicenseType() throws Exception {
-               UiResourceMetadata testSubject;
-               String licenseType = "";
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setLicenseType(licenseType);
-       }
-
-       
-       @Test
-       public void testGetToscaResourceName() throws Exception {
-               UiResourceMetadata testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getToscaResourceName();
-       }
+    private UiResourceMetadata createTestSubject() {
+        return new UiResourceMetadata(null, null, new ResourceMetadataDataDefinition());
+    }
 
-       
-       @Test
-       public void testSetToscaResourceName() throws Exception {
-               UiResourceMetadata testSubject;
-               String toscaResourceName = "";
+    @Test
+    public void testCtor() throws Exception {
+        final UiResourceMetadata testSubject = createTestSubject();
+        Assertions.assertThat(testSubject).isNotNull().isInstanceOf(UiResourceMetadata.class);
+    }
 
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setToscaResourceName(toscaResourceName);
-       }
 }
index 8527e9b..7fbbc25 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.openecomp.sdc.be.ui.model;
 
-import java.util.Map;
-
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
-import org.openecomp.sdc.be.model.ArtifactDefinition;
 
 
 public class UiServiceDataTransferTest {
 
-       private UiServiceDataTransfer createTestSubject() {
-               return new UiServiceDataTransfer();
-       }
-
-       
-       @Test
-       public void testGetMetadata() throws Exception {
-               UiServiceDataTransfer testSubject;
-               UiServiceMetadata result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getMetadata();
-       }
-
-       
-       @Test
-       public void testSetMetadata() throws Exception {
-               UiServiceDataTransfer testSubject;
-               UiServiceMetadata metadata = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setMetadata(metadata);
-       }
-
-       
-       @Test
-       public void testGetServiceApiArtifacts() throws Exception {
-               UiServiceDataTransfer testSubject;
-               Map<String, ArtifactDefinition> result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getServiceApiArtifacts();
-       }
+    private UiServiceDataTransfer createTestSubject() {
+        return new UiServiceDataTransfer();
+    }
 
-       
-       @Test
-       public void testSetServiceApiArtifacts() throws Exception {
-               UiServiceDataTransfer testSubject;
-               Map<String, ArtifactDefinition> serviceApiArtifacts = null;
+    @Test
+    public void testCtor() throws Exception {
+        final UiServiceDataTransfer testSubject = createTestSubject();
+        Assertions.assertThat(testSubject).isNotNull().isInstanceOf(UiServiceDataTransfer.class);
+    }
 
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setServiceApiArtifacts(serviceApiArtifacts);
-       }
 }
index 284216c..016f363 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
 package org.openecomp.sdc.be.ui.model;
 
+import java.util.ArrayList;
+import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.openecomp.sdc.be.datatypes.components.ServiceMetadataDataDefinition;
 
 
 public class UiServiceMetadataTest {
 
-       private UiServiceMetadata createTestSubject() {
-               return new UiServiceMetadata(null, new ServiceMetadataDataDefinition());
-       }
+    private UiServiceMetadata createTestSubject() {
+        return new UiServiceMetadata(new ArrayList<>(), new ServiceMetadataDataDefinition());
+    }
 
-       
-       @Test
-       public void testGetDistributionStatus() throws Exception {
-               UiServiceMetadata testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getDistributionStatus();
-       }
-
-       
-       @Test
-       public void testSetDistributionStatus() throws Exception {
-               UiServiceMetadata testSubject;
-               String distributionStatus = "";
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setDistributionStatus(distributionStatus);
-       }
-
-       
-       @Test
-       public void testGetEcompGeneratedNaming() throws Exception {
-               UiServiceMetadata testSubject;
-               Boolean result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getEcompGeneratedNaming();
-       }
-
-       
-       @Test
-       public void testSetEcompGeneratedNaming() throws Exception {
-               UiServiceMetadata testSubject;
-               Boolean ecompGeneratedNaming = null;
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setEcompGeneratedNaming(ecompGeneratedNaming);
-       }
-
-       
-       @Test
-       public void testGetNamingPolicy() throws Exception {
-               UiServiceMetadata testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getNamingPolicy();
-       }
-
-       
-       @Test
-       public void testSetNamingPolicy() throws Exception {
-               UiServiceMetadata testSubject;
-               String namingPolicy = "";
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setNamingPolicy(namingPolicy);
-       }
-
-       
-       @Test
-       public void testGetServiceType() throws Exception {
-               UiServiceMetadata testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getServiceType();
-       }
-
-       
-       @Test
-       public void testSetServiceType() throws Exception {
-               UiServiceMetadata testSubject;
-               String serviceType = "";
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setServiceType(serviceType);
-       }
-
-       
-       @Test
-       public void testGetServiceRole() throws Exception {
-               UiServiceMetadata testSubject;
-               String result;
-
-               // default test
-               testSubject = createTestSubject();
-               result = testSubject.getServiceRole();
-       }
-
-       
-       @Test
-       public void testSetServiceRole() throws Exception {
-               UiServiceMetadata testSubject;
-               String serviceRole = "";
-
-               // default test
-               testSubject = createTestSubject();
-               testSubject.setServiceRole(serviceRole);
-       }
+    @Test
+    public void testCtor() throws Exception {
+        final UiServiceMetadata testSubject = createTestSubject();
+        Assertions.assertThat(testSubject).isNotNull().isInstanceOf(UiServiceMetadata.class);
+    }
 }