summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/test/java')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java188
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java85
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ConsumerBusinessLogicTest.java87
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java357
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java769
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java387
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java150
7 files changed, 2022 insertions, 1 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java
new file mode 100644
index 0000000000..f2053535ad
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java
@@ -0,0 +1,188 @@
+package org.openecomp.sdc.be.components.impl;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+import javax.servlet.ServletContext;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.datatypes.elements.AdditionalInfoParameterInfo;
+import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
+import org.openecomp.sdc.be.model.AdditionalInformationDefinition;
+import org.openecomp.sdc.be.model.operations.api.IElementOperation;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import fj.data.Either;
+
+
+public class AdditionalInformationBusinessLogicTest {
+
+ private AdditionalInformationBusinessLogic createTestSubject() {
+ return new AdditionalInformationBusinessLogic();
+ }
+
+
+ @Test
+ public void testGetElementDao() throws Exception {
+ Class<IElementOperation> class1 = null;
+ ServletContext context = null;
+ IElementOperation result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testCreateAdditionalInformation() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String resourceId = "";
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ String additionalInformationUid = "";
+ String userId = "";
+ Either<AdditionalInfoParameterInfo, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateAndConvertValue() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ String context = "";
+ ResponseFormat result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateAndConvertKey() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ String context = "";
+ ResponseFormat result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateMaxSizeNotReached() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String componentId = "";
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ ResponseFormat result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateValue() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ String value = "";
+ Either<String, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testFindAdditionInformationKey() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;List<AdditionalInfoParameterInfo> parameters = null;
+ String key = "";
+ AdditionalInfoParameterInfo result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testValidateAndNormalizeKey() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ String key = "";
+ Either<String, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateAdditionalInformation() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String resourceId = "";
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ String additionalInformationUid = "";
+ String userId = "";
+ Either<AdditionalInfoParameterInfo, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteAdditionalInformation() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String resourceId = "";
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ String additionalInformationUid = "";
+ String userId = "";
+ Either<AdditionalInfoParameterInfo, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetAdditionalInformation() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String resourceId = "";
+ AdditionalInfoParameterInfo additionalInfoParameterInfo = null;
+ String additionalInformationUid = "";
+ String userId = "";
+ Either<AdditionalInfoParameterInfo, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetAllAdditionalInformation() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String resourceId = "";
+ String additionalInformationUid = "";
+ String userId = "";
+ Either<AdditionalInformationDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testVerifyCanWorkOnComponent() throws Exception {
+ AdditionalInformationBusinessLogic testSubject;
+ NodeTypeEnum nodeType = null;
+ String resourceId = "";
+ String userId = "";
+ ResponseFormat result;
+
+ // default test
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java
new file mode 100644
index 0000000000..e10c3b41ba
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java
@@ -0,0 +1,85 @@
+package org.openecomp.sdc.be.components.impl;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.PropertyDefinition;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import fj.data.Either;
+
+
+public class AttributeBusinessLogicTest {
+
+ private AttributeBusinessLogic createTestSubject() {
+ return new AttributeBusinessLogic();
+ }
+
+
+ @Test
+ public void testCreateAttribute() throws Exception {
+ AttributeBusinessLogic testSubject;
+ String resourceId = "";
+ PropertyDefinition newAttributeDef = null;
+ String userId = "";
+ Either<PropertyDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testIsAttributeExist() throws Exception {
+ AttributeBusinessLogic testSubject;List<PropertyDefinition> attributes = null;
+ String resourceUid = "";
+ String propertyName = "";
+ boolean result;
+
+ // test 1
+ testSubject=createTestSubject();attributes = null;
+ }
+
+
+ @Test
+ public void testGetAttribute() throws Exception {
+ AttributeBusinessLogic testSubject;
+ String resourceId = "";
+ String attributeId = "";
+ String userId = "";
+ Either<PropertyDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateAttribute() throws Exception {
+ AttributeBusinessLogic testSubject;
+ String resourceId = "";
+ String attributeId = "";
+ PropertyDefinition newAttDef = null;
+ String userId = "";
+ Either<PropertyDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteAttribute() throws Exception {
+ AttributeBusinessLogic testSubject;
+ String resourceId = "";
+ String attributeId = "";
+ String userId = "";
+ Either<PropertyDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ConsumerBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ConsumerBusinessLogicTest.java
new file mode 100644
index 0000000000..259d47befa
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ConsumerBusinessLogicTest.java
@@ -0,0 +1,87 @@
+package org.openecomp.sdc.be.components.impl;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.model.ConsumerDefinition;
+import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import fj.data.Either;
+
+
+public class ConsumerBusinessLogicTest {
+
+ private ConsumerBusinessLogic createTestSubject() {
+ return new ConsumerBusinessLogic();
+ }
+
+
+ @Test
+ public void testCreateConsumer() throws Exception {
+ ConsumerBusinessLogic testSubject;
+ User user = null;
+ ConsumerDefinition consumer = null;
+ Either<ConsumerDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
+
+
+ @Test
+ public void testGetConsumer() throws Exception {
+ ConsumerBusinessLogic testSubject;
+ String consumerId = "";
+ User user = null;
+ Either<ConsumerDefinition, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ user = null;
+ }
+
+
+ @Test
+ public void testGetConsumer_1() throws Exception {
+ ConsumerBusinessLogic testSubject;
+ String consumerId = "";
+ Either<ConsumerDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteConsumer() throws Exception {
+ ConsumerBusinessLogic testSubject;
+ String consumerId = "";
+ User user = null;
+ Either<ConsumerDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateConsumer() throws Exception {
+ ConsumerBusinessLogic testSubject;
+ ConsumerDefinition consumer = null;
+ User modifier = null;
+ boolean isCreateRequest = false;
+ Either<ConsumerDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java
new file mode 100644
index 0000000000..7722c1fdea
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java
@@ -0,0 +1,357 @@
+package org.openecomp.sdc.be.components.impl;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+
+import javax.annotation.Generated;
+
+import org.apache.commons.httpclient.NameValuePair;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.tinkerpop.gremlin.structure.T;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.dao.api.ActionStatus;
+import org.openecomp.sdc.be.dao.graph.datatype.GraphEdge;
+import org.openecomp.sdc.be.datamodel.api.CategoryTypeEnum;
+import org.openecomp.sdc.be.datatypes.components.ComponentMetadataDataDefinition;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+import org.openecomp.sdc.be.datatypes.enums.FilterKeyEnum;
+import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
+import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum;
+import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
+import org.openecomp.sdc.be.model.ArtifactType;
+import org.openecomp.sdc.be.model.Component;
+import org.openecomp.sdc.be.model.DistributionStatusEnum;
+import org.openecomp.sdc.be.model.LifecycleStateEnum;
+import org.openecomp.sdc.be.model.PropertyScope;
+import org.openecomp.sdc.be.model.Resource;
+import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.be.model.category.CategoryDefinition;
+import org.openecomp.sdc.be.model.category.GroupingDefinition;
+import org.openecomp.sdc.be.model.category.SubCategoryDefinition;
+import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
+import org.openecomp.sdc.be.resources.data.ComponentMetadataData;
+import org.openecomp.sdc.be.resources.data.ResourceMetadataData;
+import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
+import org.openecomp.sdc.be.resources.data.category.SubCategoryData;
+import org.openecomp.sdc.be.ui.model.UiCategories;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import com.google.common.util.concurrent.Service;
+import com.thinkaurelius.titan.core.TitanGraph;
+
+import fj.data.Either;
+import io.swagger.annotations.Tag;
+
+
+public class ElementBusinessLogicTest {
+
+ private ElementBusinessLogic createTestSubject() {
+ return new ElementBusinessLogic();
+ }
+
+
+ @Test
+ public void testGetFollowed() throws Exception {
+ ElementBusinessLogic testSubject;
+ User user = null;
+ Either<Map<String, List<? extends Component>>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
+
+ @Test
+ public void testGetAllResourceCategories() throws Exception {
+ ElementBusinessLogic testSubject;
+ Either<List<CategoryDefinition>, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetAllServiceCategories() throws Exception {
+ ElementBusinessLogic testSubject;
+ Either<List<CategoryDefinition>, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testCreateCategory() throws Exception {
+ ElementBusinessLogic testSubject;
+ CategoryDefinition category = null;
+ String componentTypeParamName = "";
+ String userId = "";
+ Either<CategoryDefinition, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ category = null;
+ }
+
+
+ @Test
+ public void testCreateSubCategory() throws Exception {
+ ElementBusinessLogic testSubject;
+ SubCategoryDefinition subCategory = null;
+ String componentTypeParamName = "";
+ String parentCategoryId = "";
+ String userId = "";
+ Either<SubCategoryDefinition, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ subCategory = null;
+ }
+
+
+ @Test
+ public void testCreateGrouping() throws Exception {
+ ElementBusinessLogic testSubject;
+ GroupingDefinition grouping = null;
+ String componentTypeParamName = "";
+ String grandParentCategoryId = "";
+ String parentSubCategoryId = "";
+ String userId = "";
+ Either<GroupingDefinition, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ grouping = null;
+ }
+
+
+ @Test
+ public void testGetAllCategories() throws Exception {
+ ElementBusinessLogic testSubject;
+ String componentType = "";
+ String userId = "";
+ Either<List<CategoryDefinition>, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ userId = null;
+
+ // test 2
+ testSubject = createTestSubject();
+ userId = "";
+ }
+
+
+ @Test
+ public void testGetAllCategories_1() throws Exception {
+ ElementBusinessLogic testSubject;
+ String userId = "";
+ Either<UiCategories, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteCategory() throws Exception {
+ ElementBusinessLogic testSubject;
+ String categoryId = "";
+ String componentTypeParamName = "";
+ String userId = "";
+ Either<CategoryDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteSubCategory() throws Exception {
+ ElementBusinessLogic testSubject;
+ String grandParentCategoryId = "";
+ String parentSubCategoryId = "";
+ String componentTypeParamName = "";
+ String userId = "";
+ Either<SubCategoryDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testDeleteGrouping() throws Exception {
+ ElementBusinessLogic testSubject;
+ String grandParentCategoryId = "";
+ String parentSubCategoryId = "";
+ String groupingId = "";
+ String componentTypeParamName = "";
+ String userId = "";
+ Either<GroupingDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
+
+ @Test
+ public void testGetAllPropertyScopes() throws Exception {
+ ElementBusinessLogic testSubject;
+ String userId = "";
+ Either<List<PropertyScope>, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetAllArtifactTypes() throws Exception {
+ ElementBusinessLogic testSubject;
+ String userId = "";
+ Either<List<ArtifactType>, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetAllDeploymentArtifactTypes() throws Exception {
+ ElementBusinessLogic testSubject;
+ Either<Map<String, Object>, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetDefaultHeatTimeout() throws Exception {
+ ElementBusinessLogic testSubject;
+ Either<Integer, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetCatalogComponents() throws Exception {
+ ElementBusinessLogic testSubject;
+ String userId = "";
+ List<OriginTypeEnum> excludeTypes = null;
+ Either<Map<String, List<? extends Component>>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testGetFilteredCatalogComponents() throws Exception {
+ ElementBusinessLogic testSubject;
+ String assetType = "";
+ Map<FilterKeyEnum, String> filters = null;
+ String query = "";
+ Either<List<? extends Component>, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ query = null;
+
+ // test 2
+ testSubject = createTestSubject();
+ query = "";
+
+ // test 3
+ testSubject = createTestSubject();
+ filters = null;
+ }
+
+
+
+
+ @Test
+ public void testGetCatalogComponentsByUuidAndAssetType() throws Exception {
+ ElementBusinessLogic testSubject;
+ String assetType = "";
+ String uuid = "";
+ Either<List<? extends Component>, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ assetType = null;
+
+ // test 2
+ testSubject = createTestSubject();
+ assetType = "";
+
+ // test 3
+ testSubject = createTestSubject();
+ assetType = null;
+
+ // test 4
+ testSubject = createTestSubject();
+ assetType = "";
+ }
+
+
+ @Test
+ public void testGetAllComponentTypesParamNames() throws Exception {
+ ElementBusinessLogic testSubject;
+ List<String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getAllComponentTypesParamNames();
+ }
+
+
+ @Test
+ public void testGetAllSupportedRoles() throws Exception {
+ ElementBusinessLogic testSubject;
+ List<String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getAllSupportedRoles();
+ }
+
+
+ @Test
+ public void testGetResourceTypesMap() throws Exception {
+ ElementBusinessLogic testSubject;
+ Either<Map<String, String>, ActionStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
+
+
+ @Test
+ public void testGetFilteredResouces() throws Exception {
+ ElementBusinessLogic testSubject;
+ Map<FilterKeyEnum, String> filters = null;
+ boolean inTransaction = false;
+ Either<List<Component>, StorageOperationStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java
new file mode 100644
index 0000000000..df2d2e7fdc
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java
@@ -0,0 +1,769 @@
+package org.openecomp.sdc.be.components.impl;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.junit.Test;
+import org.openecomp.sdc.be.dao.titan.TitanOperationStatus;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+import org.openecomp.sdc.be.info.ArtifactTemplateInfo;
+import org.openecomp.sdc.be.info.GroupDefinitionInfo;
+import org.openecomp.sdc.be.model.Component;
+import org.openecomp.sdc.be.model.ComponentInstance;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
+import org.openecomp.sdc.be.model.GroupDefinition;
+import org.openecomp.sdc.be.model.GroupInstance;
+import org.openecomp.sdc.be.model.GroupInstanceProperty;
+import org.openecomp.sdc.be.model.GroupProperty;
+import org.openecomp.sdc.be.model.PropertyDefinition;
+import org.openecomp.sdc.be.model.PropertyDefinition.PropertyNames;
+import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import com.google.common.base.Function;
+
+import fj.data.Either;
+
+
+public class GroupBusinessLogicTest {
+
+ private GroupBusinessLogic createTestSubject() {
+ return new GroupBusinessLogic();
+ }
+
+
+ @Test
+ public void testGetComponentTypeForResponse() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testVerifyArtifactsBelongsToComponent() throws Exception {
+ GroupBusinessLogic testSubject;Component component = null;
+ List<String> artifacts = null;
+ String context = "";
+ Either<Boolean,ResponseFormat> result;
+
+ // test 1
+ testSubject=createTestSubject();artifacts = null;
+
+
+ }
+
+
+ @Test
+ public void testVerifyComponentInstancesAreValidMembers() throws Exception {
+ GroupBusinessLogic testSubject;Component component = null;
+ ComponentTypeEnum componentType = null;
+ String groupName = "";
+ String groupType = "";
+ Map<String,String> groupMembers = null;
+ List<String> memberToscaTypes = null;
+ Either<Boolean,ResponseFormat> result;
+
+ // test 1
+ testSubject=createTestSubject();groupMembers = null;
+
+
+
+ // test 2
+ testSubject=createTestSubject();memberToscaTypes = null;
+
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateGroupMetadata() throws Exception {
+ GroupBusinessLogic testSubject;
+ String componentId = "";
+ User user = null;
+ ComponentTypeEnum componentType = null;
+ GroupDefinition updatedGroup = null;
+ boolean inTransaction = false;
+ boolean shouldLock = false;
+ Either<GroupDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateGroupMetadata() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ GroupDefinition currentGroup = null;
+ GroupDefinition updatedGroup = null;
+ Either<GroupDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateGroup() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ GroupDefinition updatedGroup = null;
+ String currentGroupName = "";
+ Either<GroupDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateGroupProperties() throws Exception {
+ GroupBusinessLogic testSubject;
+ String componentId = "";
+ String groupUniqueId = "";
+ User user = null;
+ ComponentTypeEnum componentType = null;
+ List<GroupProperty> groupPropertiesToUpdate = null;
+ boolean inTransaction = false;
+ Either<List<GroupProperty>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testResetEmptyValueWithDefaults() throws Exception {
+ GroupBusinessLogic testSubject;List<GroupProperty> groupPropertiesToUpdate = null;
+ GroupDefinition originalGroup = null;
+
+
+ // default test
+ }
+
+
+ @Test
+ public void testValidateGroupPropertyAndResetEmptyValue() throws Exception {
+ GroupBusinessLogic testSubject;GroupDefinition originalGroup = null;
+ List<GroupProperty> groupPropertiesToUpdate = null;
+ Either<List<GroupProperty>,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testValidatePropertyBusinessLogic() throws Exception {
+ GroupBusinessLogic testSubject;List<GroupProperty> groupPropertiesToUpdate = null;
+ GroupDefinition originalGroup = null;
+ Either<List<GroupProperty>,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testPrepareMapWithOriginalProperties() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupDefinition originalGroup = null;
+ Map<PropertyNames, String> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateOnlyValueChanged() throws Exception {
+ GroupBusinessLogic testSubject;List<GroupProperty> groupPropertiesToUpdate = null;
+ GroupDefinition originalGroup = null;
+ Either<List<GroupProperty>,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testIsOnlyGroupPropertyValueChanged() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupProperty groupProperty = null;
+ GroupProperty groupProperty2 = null;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateGroupMetadata_1() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupDefinition currentGroup = null;
+ GroupDefinition groupUpdate = null;
+ Either<GroupDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateGroupName() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupDefinition currentGroup = null;
+ GroupDefinition groupUpdate = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateGroupName() throws Exception {
+ GroupBusinessLogic testSubject;
+ String currentGroupName = "";
+ String groupUpdateName = "";
+ boolean isforceNameModification = false;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetGroupWithArtifactsById() throws Exception {
+ GroupBusinessLogic testSubject;
+ ComponentTypeEnum componentType = null;
+ String componentId = "";
+ String groupId = "";
+ String userId = "";
+ boolean inTransaction = false;
+ Either<GroupDefinitionInfo, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testFindGroupOnComponent() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ String groupId = "";
+ Either<GroupDefinition, StorageOperationStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateGroupsBeforeUpdate() throws Exception {
+ GroupBusinessLogic testSubject;String componentId = "";
+ String userId = "";
+ ComponentTypeEnum componentType = null;
+ List<GroupDefinition> groups = null;
+ boolean inTransaction = false;
+ Either<org.openecomp.sdc.be.model.Component,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateGroupsInComponentByFunc() throws Exception {
+ GroupBusinessLogic testSubject;List<GroupDefinition> groups = null;
+ Component component = null;
+ Function<GroupDefinition,String> getByParam = null;
+ ResponseFormat result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testGetAsString() throws Exception {
+ GroupBusinessLogic testSubject;
+ List<String> list = null;
+ String result;
+
+ // test 1
+ testSubject = createTestSubject();
+ list = null;
+
+
+ }
+
+
+ @Test
+ public void testUpdateGroupPropertiesValue() throws Exception {
+ GroupBusinessLogic testSubject;String componentId = "";
+ GroupDefinition currentGroup = null;
+ List<GroupProperty> groupPropertyToUpdate = null;
+ boolean inTransaction = false;
+ Either<List<GroupProperty>,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateGenerateVfModuleGroupNames() throws Exception {
+ GroupBusinessLogic testSubject;
+ List<ArtifactTemplateInfo> allGroups = null;
+ String resourceSystemName = "";
+ int startGroupCounter = 0;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateGenerateVfModuleGroupName() throws Exception {
+ GroupBusinessLogic testSubject;
+ String resourceSystemName = "";
+ String description = "";
+ int groupCounter = 0;
+ Either<String, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ resourceSystemName = null;
+ description = null;
+
+
+
+ // test 2
+ testSubject = createTestSubject();
+ resourceSystemName = "";
+ description = null;
+
+
+
+ // test 3
+ testSubject = createTestSubject();
+ description = null;
+ resourceSystemName = null;
+
+
+
+ // test 4
+ testSubject = createTestSubject();
+ description = "";
+ resourceSystemName = null;
+
+
+ }
+
+
+ @Test
+ public void testValidateUpdateVfGroupNames() throws Exception {
+ GroupBusinessLogic testSubject;
+ Map<String, GroupDefinition> groups = null;
+ String resourceSystemName = "";
+ Either<Map<String, GroupDefinition>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetNextVfModuleNameCounter() throws Exception {
+ GroupBusinessLogic testSubject;
+ Map<String, GroupDefinition> groups = null;
+ int result;
+
+ // test 1
+ testSubject = createTestSubject();
+ groups = null;
+
+
+ }
+
+
+ @Test
+ public void testGetNextVfModuleNameCounter_1() throws Exception {
+ GroupBusinessLogic testSubject;
+ Collection<GroupDefinition> groups = null;
+ int result;
+
+ // test 1
+ testSubject = createTestSubject();
+ groups = null;
+
+
+ }
+
+
+ @Test
+ public void testValidateUpdateVfGroupNamesOnGraph() throws Exception {
+ GroupBusinessLogic testSubject;
+ List<GroupDefinition> groups = null;
+ Component component = null;
+ boolean inTransaction = false;
+ Either<List<GroupDefinition>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetGroupInstWithArtifactsById() throws Exception {
+ GroupBusinessLogic testSubject;
+ ComponentTypeEnum componentType = null;
+ String componentId = "";
+ String componentInstanceId = "";
+ String groupInstId = "";
+ String userId = "";
+ boolean inTransaction = false;
+ Either<GroupDefinitionInfo, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testFindComponentInstanceAndGroupInstanceOnComponent() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ String componentInstanceId = "";
+ String groupInstId = "";
+ Either<ImmutablePair<ComponentInstance, GroupInstance>, StorageOperationStatus> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetLatestIntProperty() throws Exception {
+ GroupBusinessLogic testSubject;Map<PropertyNames,String> newValues = null;
+ Map<PropertyNames,String> parentValues = null;
+ PropertyNames propertyKey = null;
+ int result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testIsPropertyChanged() throws Exception {
+ GroupBusinessLogic testSubject;Map<PropertyNames,String> newValues = null;
+ Map<PropertyNames,String> parentValues = null;
+ PropertyNames minInstances = null;
+ boolean result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateMinMaxAndInitialCountPropertyLogicVF() throws Exception {
+ GroupBusinessLogic testSubject;Map<PropertyNames,String> newValues = null;
+ Map<PropertyNames,String> parentValues = null;
+ Either<Boolean,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateMinMaxAndInitialCountPropertyLogic() throws Exception {
+ GroupBusinessLogic testSubject;Map<PropertyNames,String> newValues = null;
+ Map<PropertyNames,String> currValues = null;
+ Map<PropertyNames,String> parentValues = null;
+ Either<Boolean,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateValueInRange() throws Exception {
+ GroupBusinessLogic testSubject;ImmutablePair<PropertyNames,String> newValue = null;
+ ImmutablePair<PropertyNames,String> min = null;
+ ImmutablePair<PropertyNames,String> max = null;
+ Either<Boolean,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testParseIntValue() throws Exception {
+ GroupBusinessLogic testSubject;
+ String value = "";
+ PropertyNames propertyName = null;
+ int result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateGroupInstancePropertyValues() throws Exception {
+ GroupBusinessLogic testSubject;
+ String componentId = "";
+ String instanceId = "";
+ GroupInstance oldGroupInstance = null;
+ List<GroupInstanceProperty> newProperties = null;
+ boolean inTransaction = false;
+ Either<GroupInstance, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateReduceGroupInstancePropertiesBeforeUpdate() throws Exception {
+ GroupBusinessLogic testSubject;GroupInstance oldGroupInstance = null;
+ List<GroupInstanceProperty> newProperties = null;
+ Either<List<GroupInstanceProperty>,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testFillValuesAndParentValuesFromExistingProperties() throws Exception {
+ GroupBusinessLogic testSubject;Map<String,GroupInstanceProperty> existingProperties = null;
+ Map<PropertyNames,String> propertyValues = null;
+ Map<PropertyNames,String> parentPropertyValues = null;
+
+
+ // default test
+ }
+
+
+ @Test
+ public void testHandleAndAddProperty() throws Exception {
+ GroupBusinessLogic testSubject;List<GroupInstanceProperty> reducedProperties = null;
+ Map<PropertyNames,String> newPropertyValues = null;
+ GroupInstanceProperty currNewProperty = null;
+ GroupInstanceProperty currExistingProperty = null;
+ Either<Boolean,ResponseFormat> result;
+
+ // default test
+ testSubject=createTestSubject();
+ }
+
+
+ @Test
+ public void testIsUpdatable() throws Exception {
+ GroupBusinessLogic testSubject;
+ PropertyNames updatablePropertyName = null;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testAddPropertyUpdatedValues() throws Exception {
+ GroupBusinessLogic testSubject;List<GroupInstanceProperty> reducedProperties = null;
+ PropertyNames propertyName = null;
+ Map<PropertyNames,String> newPropertyValues = null;
+ GroupInstanceProperty newProperty = null;
+ GroupInstanceProperty existingProperty = null;
+
+
+ // default test
+ }
+
+
+ @Test
+ public void testIsEmptyMinInitialCountValue() throws Exception {
+ GroupBusinessLogic testSubject;
+ PropertyNames propertyName = null;
+ String newValue = "";
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testConvertIfUnboundMax() throws Exception {
+ GroupBusinessLogic testSubject;
+ String value = "";
+ int result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdatePropertyValue() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupInstanceProperty newProperty = null;
+ GroupInstanceProperty existingProperty = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateImmutableProperty() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupProperty oldProperty = null;
+ GroupProperty newProperty = null;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testCreateGroups() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ User user = null;
+ ComponentTypeEnum componentType = null;
+ List<GroupDefinition> groupDefinitions = null;
+ Either<List<GroupDefinition>, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ groupDefinitions = null;
+
+
+ }
+
+
+ @Test
+ public void testAddGroups() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ User user = null;
+ ComponentTypeEnum componentType = null;
+ List<GroupDefinition> groupDefinitions = null;
+ Either<List<GroupDefinition>, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ groupDefinitions = null;
+
+
+ }
+
+
+ @Test
+ public void testDeleteGroups() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ User user = null;
+ ComponentTypeEnum componentType = null;
+ List<GroupDefinition> groupDefinitions = null;
+ Either<List<GroupDefinition>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testUpdateGroups() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ ComponentTypeEnum componentType = null;
+ List<GroupDefinition> groupDefinitions = null;
+ Either<List<GroupDefinition>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testHandleGroup() throws Exception {
+ GroupBusinessLogic testSubject;
+ Component component = null;
+ User user = null;
+ ComponentTypeEnum componentType = null;
+ GroupDefinition groupDefinition = null;
+ Map<String, DataTypeDefinition> allDAtaTypes = null;
+ Either<GroupDefinition, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testHandleProperty() throws Exception {
+ GroupBusinessLogic testSubject;
+ GroupProperty groupProperty = null;
+ PropertyDefinition prop = null;
+ Integer index = 0;
+ Map<String, DataTypeDefinition> allDataTypes = null;
+ Either<GroupProperty, TitanOperationStatus> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ prop = null;
+
+
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java
new file mode 100644
index 0000000000..222bba53d2
--- /dev/null
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java
@@ -0,0 +1,387 @@
+package org.openecomp.sdc.be.components.impl;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.apache.commons.math3.stat.descriptive.summary.Product;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+import org.openecomp.sdc.be.model.Component;
+import org.openecomp.sdc.be.model.ComponentInstance;
+import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.be.model.operations.api.ICacheMangerOperation;
+import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
+import org.openecomp.sdc.be.ui.model.UiComponentDataTransfer;
+import org.openecomp.sdc.exception.ResponseFormat;
+
+import fj.data.Either;
+
+
+public class ProductBusinessLogicTest {
+
+ private ProductBusinessLogic createTestSubject() {
+ return new ProductBusinessLogic();
+ }
+
+ @Test
+ public void testValidateProductNameExists() throws Exception {
+ ProductBusinessLogic testSubject;
+ String productName = "";
+ String userId = "";
+ Either<Map<String, Boolean>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+ @Test
+ public void testSetDeploymentArtifactsPlaceHolder() throws Exception {
+ ProductBusinessLogic testSubject;
+ Component component = null;
+ User user = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setDeploymentArtifactsPlaceHolder(component, user);
+ }
+
+ @Test
+ public void testDeleteMarkedComponents() throws Exception {
+ ProductBusinessLogic testSubject;
+ Either<List<String>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+ @Test
+ public void testGetComponentInstanceBL() throws Exception {
+ ProductBusinessLogic testSubject;
+ ComponentInstanceBusinessLogic result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+ @Test
+ public void testGetComponentInstancesFilteredByPropertiesAndInputs() throws Exception {
+ ProductBusinessLogic testSubject;
+ String componentId = "";
+ ComponentTypeEnum componentTypeEnum = null;
+ String userId = "";
+ String searchText = "";
+ Either<List<ComponentInstance>, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+ @Test
+ public void testGetCacheManagerOperation() throws Exception {
+ ProductBusinessLogic testSubject;
+ ICacheMangerOperation result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+ @Test
+ public void testSetCacheManagerOperation() throws Exception {
+ ProductBusinessLogic testSubject;
+ ICacheMangerOperation cacheManagerOperation = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setCacheManagerOperation(cacheManagerOperation);
+ }
+
+ @Test
+ public void testGetUiComponentDataTransferByComponentId() throws Exception {
+ ProductBusinessLogic testSubject;
+ String componentId = "";
+ List<String> dataParamsToReturn = null;
+ Either<UiComponentDataTransfer, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testCreateProduct() throws Exception {
+ ProductBusinessLogic testSubject;
+ Product product = null;
+ User user = null;
+ Either<Product, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ product = null;
+
+ }
+
+
+ @Test
+ public void testCheckUnupdatableProductFields() throws Exception {
+ ProductBusinessLogic testSubject;
+ Product product = null;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateProductBeforeCreate() throws Exception {
+ ProductBusinessLogic testSubject;
+ Product product = null;
+ User user = null;
+ AuditingActionEnum actionEnum = null;
+ Either<Product, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateProductFieldsBeforeCreate() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product product = null;
+ AuditingActionEnum actionEnum = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateProductContactsList() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product product = null;
+ AuditingActionEnum actionEnum = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateGrouping() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product product = null;
+ AuditingActionEnum actionEnum = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetProduct() throws Exception {
+ ProductBusinessLogic testSubject;
+ String productId = "";
+ User user = null;
+ Either<Product, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testDeleteProduct() throws Exception {
+ ProductBusinessLogic testSubject;
+ String productId = "";
+ User user = null;
+ Either<Product, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateProductFullNameAndCleanup() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product product = null;
+ AuditingActionEnum actionEnum = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateProductNameAndCleanup() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product product = null;
+ AuditingActionEnum actionEnum = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testValidateTagsListAndRemoveDuplicates() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product product = null;
+ String oldProductName = "";
+ AuditingActionEnum actionEnum = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+ }
+
+
+ @Test
+ public void testUpdateProductMetadata() throws Exception {
+ ProductBusinessLogic testSubject;
+ String productId = "";
+ Product updatedProduct = null;
+ User user = null;
+ Either<Product, ResponseFormat> result;
+
+ // test 1
+ testSubject = createTestSubject();
+ updatedProduct = null;
+ }
+
+
+ @Test
+ public void testValidateAndUpdateProductMetadata() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product currentProduct = null;
+ Product updatedProduct = null;
+ Either<Product, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateProductName() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product currentProduct = null;
+ Product updatedProduct = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateFullName() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product currentProduct = null;
+ Product updatedProduct = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateCategory() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product currentProduct = null;
+ Product updatedProduct = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateContactList() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product currentProduct = null;
+ Product updatedProduct = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateAndUpdateTags() throws Exception {
+ ProductBusinessLogic testSubject;
+ User user = null;
+ Product currentProduct = null;
+ Product updatedProduct = null;
+ Either<Boolean, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testValidateTagPattern() throws Exception {
+ ProductBusinessLogic testSubject;
+ String tag = "";
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+
+
+ @Test
+ public void testGetProductByNameAndVersion() throws Exception {
+ ProductBusinessLogic testSubject;
+ String productName = "";
+ String productVersion = "";
+ String userId = "";
+ Either<Product, ResponseFormat> result;
+
+ // default test
+ testSubject = createTestSubject();
+
+ }
+} \ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java
index 796a426e26..0e27636901 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java
@@ -51,6 +51,7 @@ import org.openecomp.sdc.be.auditing.api.IAuditingManager;
import org.openecomp.sdc.be.auditing.impl.AuditingLogFormatUtil;
import org.openecomp.sdc.be.auditing.impl.AuditingManager;
import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic.ArtifactOperationEnum;
+import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic.ArtifactOperationInfo;
import org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic;
import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction;
import org.openecomp.sdc.be.config.ConfigurationManager;
@@ -62,25 +63,32 @@ import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.openecomp.sdc.be.impl.WebAppContextWrapper;
+import org.openecomp.sdc.be.info.ArtifactTemplateInfo;
+import org.openecomp.sdc.be.info.MergedArtifactInfo;
import org.openecomp.sdc.be.model.ArtifactDefinition;
import org.openecomp.sdc.be.model.CapabilityDefinition;
import org.openecomp.sdc.be.model.Component;
import org.openecomp.sdc.be.model.ComponentInstance;
-import org.openecomp.sdc.be.model.ComponentMetadataDefinition;
+import org.openecomp.sdc.be.model.ComponentInstanceInput;
+import org.openecomp.sdc.be.model.ComponentInstanceProperty;
import org.openecomp.sdc.be.model.CsarInfo;
import org.openecomp.sdc.be.model.DataTypeDefinition;
import org.openecomp.sdc.be.model.GroupDefinition;
import org.openecomp.sdc.be.model.GroupProperty;
import org.openecomp.sdc.be.model.GroupTypeDefinition;
+import org.openecomp.sdc.be.model.HeatParameterDefinition;
import org.openecomp.sdc.be.model.InputDefinition;
import org.openecomp.sdc.be.model.LifeCycleTransitionEnum;
import org.openecomp.sdc.be.model.LifecycleStateEnum;
import org.openecomp.sdc.be.model.NodeTypeInfo;
import org.openecomp.sdc.be.model.ParsedToscaYamlInfo;
import org.openecomp.sdc.be.model.PropertyDefinition;
+import org.openecomp.sdc.be.model.RequirementCapabilityRelDef;
+import org.openecomp.sdc.be.model.RequirementDefinition;
import org.openecomp.sdc.be.model.Resource;
import org.openecomp.sdc.be.model.UploadCapInfo;
import org.openecomp.sdc.be.model.UploadComponentInstanceInfo;
+import org.openecomp.sdc.be.model.UploadPropInfo;
import org.openecomp.sdc.be.model.UploadReqInfo;
import org.openecomp.sdc.be.model.UploadResourceInfo;
import org.openecomp.sdc.be.model.User;
@@ -121,6 +129,8 @@ import org.slf4j.LoggerFactory;
import org.springframework.web.context.WebApplicationContext;
import com.att.nsa.cambria.test.support.CambriaBatchingPublisherMock.Entry;
+import com.google.common.base.Equivalence.Wrapper;
+import com.netflix.astyanax.connectionpool.Operation;
import fj.data.Either;
@@ -2225,5 +2235,143 @@ public class ResourceBusinessLogicTest {
testSubject.setCacheManagerOperation(cacheManagerOperation);
}
+
+ @Test
+ public void testGetElementDao_1() throws Exception {
+ ResourceBusinessLogic testSubject;IElementOperation result;
+
+ // default test
+ testSubject=createTestSubject();result=testSubject.getElementDao();
+ }
+
+
+ @Test
+ public void testGetAllCertifiedResources() throws Exception {
+ ResourceBusinessLogic testSubject;boolean getAbstract = false;
+ HighestFilterEnum highestFilter = null;
+ String userId = "";
+ Either<List<Resource>,ResponseFormat> result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testValidateResourceNameExists() throws Exception {
+ ResourceBusinessLogic testSubject;String resourceName = "";
+ ResourceTypeEnum resourceTypeEnum = null;
+ String userId = "";
+ Either<Map<String,Boolean>,ResponseFormat> result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testCreateResource() throws Exception {
+ ResourceBusinessLogic testSubject;Resource resource = null;
+ AuditingActionEnum auditingAction = null;
+ User user = null;
+ Map<String,byte[]> csarUIPayload = null;
+ String payloadName = "";
+ Either<Resource,ResponseFormat> result;
+
+ // test 1
+ testSubject=createTestSubject();payloadName = null;
+
+ // test 2
+ testSubject=createTestSubject();payloadName = "";
+ }
+
+
+ @Test
+ public void testValidateAndUpdateResourceFromCsar() throws Exception {
+ ResourceBusinessLogic testSubject;Resource resource = null;
+ User user = null;
+ Map<String,byte[]> csarUIPayload = null;
+ String payloadName = "";
+ String resourceUniqueId = "";
+ Either<Resource,ResponseFormat> result;
+
+ // test 1
+ testSubject=createTestSubject();payloadName = null;
+
+ // test 2
+ testSubject=createTestSubject();payloadName = "";
+ }
+
+
+
+
+
+
+
+
+
+
+
+ @Test
+ public void testCreateResourceFromCsar() throws Exception {
+ ResourceBusinessLogic testSubject;Resource resource = null;
+ User user = null;
+ Either<Map<String,byte[]>,StorageOperationStatus> csarUIPayload = null;
+ String csarUUID = "";
+ Either<Resource,ResponseFormat> result;
+
+ // test 1
+ testSubject=createTestSubject();csarUIPayload = null;
+ }
+
+
+
+
+
+
+
+ @Test
+ public void testCreateResourcesFromYamlNodeTypesList() throws Exception {
+ ResourceBusinessLogic testSubject;String yamlName = "";
+ Resource resource = null;
+ Map<String,Object> mappedToscaTemplate = null;
+ boolean needLock = false;
+ Map<String,EnumMap<ArtifactOperationEnum,List<ArtifactDefinition>>> nodeTypesArtifactsToHandle = null;
+ List<ArtifactDefinition> nodeTypesNewCreatedArtifacts = null;
+ Map<String,NodeTypeInfo> nodeTypesInfo = null;
+ CsarInfo csarInfo = null;
+ Either<Map<String,Resource>,ResponseFormat> result;
+
+ // default test
+ }
+
+
+
+
+
+
+ @Test
+ public void testValidateResourceCreationFromNodeType() throws Exception {
+ ResourceBusinessLogic testSubject;Resource resource = null;
+ User creator = null;
+ Either<Boolean,ResponseFormat> result;
+
+ // default test
+ }
+
+
+ @Test
+ public void testCreateResourceFromNodeType() throws Exception {
+ ResourceBusinessLogic testSubject;String nodeTypeYaml = "";
+ UploadResourceInfo resourceMetaData = null;
+ User creator = null;
+ boolean isInTransaction = false;
+ boolean needLock = false;
+ Map<ArtifactOperationEnum,List<ArtifactDefinition>> nodeTypeArtifactsToHandle = null;
+ List<ArtifactDefinition> nodeTypesNewCreatedArtifacts = null;
+ boolean forceCertificationAllowed = false;
+ CsarInfo csarInfo = null;
+ Either<ImmutablePair<Resource,ActionStatus>,ResponseFormat> result;
+
+ // default test
+ }
}