summaryrefslogtreecommitdiffstats
path: root/catalog-model
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UIConstraint.java59
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UINodeFilter.java11
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCategories.java29
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java33
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransfer.java268
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java260
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiLeftPaletteComponent.java109
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransfer.java80
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java94
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransfer.java36
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceMetadata.java108
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UIConstraintTest.java29
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UINodeFilterTest.java15
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiCategoriesTest.java83
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiCombinationTest.java15
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransferTest.java448
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransferTest.java197
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiResourceMetadataTest.java215
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransferTest.java61
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiServiceMetadataTest.java126
20 files changed, 239 insertions, 2037 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UIConstraint.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UIConstraint.java
index 63353c167d..638e2361d6 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UIConstraint.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UIConstraint.java
@@ -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();
}
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UINodeFilter.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UINodeFilter.java
index 16ce3a837b..84df74c47f 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UINodeFilter.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UINodeFilter.java
@@ -16,16 +16,13 @@
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;
- }
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCategories.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCategories.java
index 8bbe02e008..99c0d33b17 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCategories.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCategories.java
@@ -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.
@@ -20,32 +20,17 @@
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;
- }
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java
index c9a94ce77a..952f3b1ff8 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiCombination.java
@@ -18,35 +18,14 @@
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;
- }
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransfer.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransfer.java
index 4272a5c485..38d5a90742 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransfer.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransfer.java
@@ -21,6 +21,10 @@
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;
- }
-
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java
index d0c7874323..2a7c036d3e 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiComponentMetadata.java
@@ -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.
@@ -20,13 +20,16 @@
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;
- }
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiLeftPaletteComponent.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiLeftPaletteComponent.java
index b0b01fad4e..d51298b8bc 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiLeftPaletteComponent.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiLeftPaletteComponent.java
@@ -21,31 +21,31 @@
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();
}
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransfer.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransfer.java
index b3c3b6781b..380593b4b3 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransfer.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransfer.java
@@ -20,14 +20,18 @@
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;
- }
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java
index d84ce25017..c8d7bdfb7c 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiResourceMetadata.java
@@ -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.
@@ -20,12 +20,17 @@
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;
- }
-
-
-
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransfer.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransfer.java
index b2c2f7a2a5..cee7cf04ca 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransfer.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransfer.java
@@ -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.
@@ -20,38 +20,20 @@
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;
- }
}
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceMetadata.java b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceMetadata.java
index 454e970fd5..e1fe5876e6 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceMetadata.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/ui/model/UiServiceMetadata.java
@@ -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.
@@ -20,91 +20,35 @@
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;
- }
}
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UIConstraintTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UIConstraintTest.java
index e95fc85833..7fd473ada3 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UIConstraintTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UIConstraintTest.java
@@ -19,14 +19,33 @@
*/
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
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UINodeFilterTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UINodeFilterTest.java
index 8f767fe418..0f3dc79563 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UINodeFilterTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UINodeFilterTest.java
@@ -19,14 +19,19 @@
*/
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
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiCategoriesTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiCategoriesTest.java
index 1108289a77..8e492d6462 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiCategoriesTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiCategoriesTest.java
@@ -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.
@@ -20,81 +20,20 @@
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);
- }
}
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiCombinationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiCombinationTest.java
index 3bce3fd779..d34577a1e4 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiCombinationTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiCombinationTest.java
@@ -19,14 +19,19 @@
*/
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
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransferTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransferTest.java
index 758250dc7d..5a67f55979 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransferTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiComponentDataTransferTest.java
@@ -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.
@@ -20,445 +20,19 @@
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);
- }
}
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransferTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransferTest.java
index 55cd4e9eba..b44cbd017c 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransferTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiResourceDataTransferTest.java
@@ -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.
@@ -20,194 +20,19 @@
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);
+ }
}
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiResourceMetadataTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiResourceMetadataTest.java
index 5aef1258c7..d548d76274 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiResourceMetadataTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiResourceMetadataTest.java
@@ -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.
@@ -20,214 +20,21 @@
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);
- }
}
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransferTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransferTest.java
index 8527e9bb03..7fbbc25269 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransferTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiServiceDataTransferTest.java
@@ -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.
@@ -20,59 +20,20 @@
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);
- }
}
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiServiceMetadataTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiServiceMetadataTest.java
index 284216cfcf..016f36387a 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiServiceMetadataTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/ui/model/UiServiceMetadataTest.java
@@ -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.
@@ -20,123 +20,21 @@
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);
+ }
}