From e4b4966a5ce4a2ebc7e1b75ab723bd5931e9ebcd Mon Sep 17 00:00:00 2001 From: Yuli Shlosberg Date: Fri, 20 Oct 2017 17:10:47 +0300 Subject: add few more tests to BE components Change-Id: I64ce164904c16101e75d8a9db9de85633269ff05 Issue-Id: SDC-467 Signed-off-by: Yuli Shlosberg (cherry picked from commit 1dd40bdded400e13ec8034c7358370dbad7eccd3) --- .../AdditionalInformationBusinessLogicTest.java | 188 +++++ .../impl/AttributeBusinessLogicTest.java | 85 +++ .../components/impl/ConsumerBusinessLogicTest.java | 87 +++ .../components/impl/ElementBusinessLogicTest.java | 357 ++++++++++ .../be/components/impl/GroupBusinessLogicTest.java | 769 +++++++++++++++++++++ .../components/impl/ProductBusinessLogicTest.java | 387 +++++++++++ .../components/impl/ResourceBusinessLogicTest.java | 150 +++- 7 files changed, 2022 insertions(+), 1 deletion(-) create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AdditionalInformationBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/AttributeBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ConsumerBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ElementBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/GroupBusinessLogicTest.java create mode 100644 catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ProductBusinessLogicTest.java (limited to 'catalog-be/src') 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 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 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 result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testFindAdditionInformationKey() throws Exception { + AdditionalInformationBusinessLogic testSubject;List parameters = null; + String key = ""; + AdditionalInfoParameterInfo result; + + // default test + } + + + @Test + public void testValidateAndNormalizeKey() throws Exception { + AdditionalInformationBusinessLogic testSubject; + String key = ""; + Either 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 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 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 result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testGetAllAdditionalInformation() throws Exception { + AdditionalInformationBusinessLogic testSubject; + NodeTypeEnum nodeType = null; + String resourceId = ""; + String additionalInformationUid = ""; + String userId = ""; + Either 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 result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testIsAttributeExist() throws Exception { + AttributeBusinessLogic testSubject;List 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 result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testUpdateAttribute() throws Exception { + AttributeBusinessLogic testSubject; + String resourceId = ""; + String attributeId = ""; + PropertyDefinition newAttDef = null; + String userId = ""; + Either result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testDeleteAttribute() throws Exception { + AttributeBusinessLogic testSubject; + String resourceId = ""; + String attributeId = ""; + String userId = ""; + Either 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 result; + + // default test + testSubject = createTestSubject(); + } + + + + + + @Test + public void testGetConsumer() throws Exception { + ConsumerBusinessLogic testSubject; + String consumerId = ""; + User user = null; + Either result; + + // test 1 + testSubject = createTestSubject(); + user = null; + } + + + @Test + public void testGetConsumer_1() throws Exception { + ConsumerBusinessLogic testSubject; + String consumerId = ""; + Either result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testDeleteConsumer() throws Exception { + ConsumerBusinessLogic testSubject; + String consumerId = ""; + User user = null; + Either result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testUpdateConsumer() throws Exception { + ConsumerBusinessLogic testSubject; + ConsumerDefinition consumer = null; + User modifier = null; + boolean isCreateRequest = false; + Either 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>, ResponseFormat> result; + + // default test + testSubject = createTestSubject(); + } + + + + + @Test + public void testGetAllResourceCategories() throws Exception { + ElementBusinessLogic testSubject; + Either, ActionStatus> result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testGetAllServiceCategories() throws Exception { + ElementBusinessLogic testSubject; + Either, ActionStatus> result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testCreateCategory() throws Exception { + ElementBusinessLogic testSubject; + CategoryDefinition category = null; + String componentTypeParamName = ""; + String userId = ""; + Either 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 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 result; + + // test 1 + testSubject = createTestSubject(); + grouping = null; + } + + + @Test + public void testGetAllCategories() throws Exception { + ElementBusinessLogic testSubject; + String componentType = ""; + String userId = ""; + Either, 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 result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testDeleteCategory() throws Exception { + ElementBusinessLogic testSubject; + String categoryId = ""; + String componentTypeParamName = ""; + String userId = ""; + Either result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testDeleteSubCategory() throws Exception { + ElementBusinessLogic testSubject; + String grandParentCategoryId = ""; + String parentSubCategoryId = ""; + String componentTypeParamName = ""; + String userId = ""; + Either result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testDeleteGrouping() throws Exception { + ElementBusinessLogic testSubject; + String grandParentCategoryId = ""; + String parentSubCategoryId = ""; + String groupingId = ""; + String componentTypeParamName = ""; + String userId = ""; + Either result; + + // default test + testSubject = createTestSubject(); + } + + + + + @Test + public void testGetAllPropertyScopes() throws Exception { + ElementBusinessLogic testSubject; + String userId = ""; + Either, ActionStatus> result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testGetAllArtifactTypes() throws Exception { + ElementBusinessLogic testSubject; + String userId = ""; + Either, ActionStatus> result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testGetAllDeploymentArtifactTypes() throws Exception { + ElementBusinessLogic testSubject; + Either, ActionStatus> result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testGetDefaultHeatTimeout() throws Exception { + ElementBusinessLogic testSubject; + Either result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testGetCatalogComponents() throws Exception { + ElementBusinessLogic testSubject; + String userId = ""; + List excludeTypes = null; + Either>, ResponseFormat> result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testGetFilteredCatalogComponents() throws Exception { + ElementBusinessLogic testSubject; + String assetType = ""; + Map filters = null; + String query = ""; + Either, 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, 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 result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getAllComponentTypesParamNames(); + } + + + @Test + public void testGetAllSupportedRoles() throws Exception { + ElementBusinessLogic testSubject; + List result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getAllSupportedRoles(); + } + + + @Test + public void testGetResourceTypesMap() throws Exception { + ElementBusinessLogic testSubject; + Either, ActionStatus> result; + + // default test + testSubject = createTestSubject(); + } + + + + + + @Test + public void testGetFilteredResouces() throws Exception { + ElementBusinessLogic testSubject; + Map filters = null; + boolean inTransaction = false; + Either, 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 artifacts = null; + String context = ""; + Either 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 groupMembers = null; + List memberToscaTypes = null; + Either 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 result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testUpdateGroupMetadata() throws Exception { + GroupBusinessLogic testSubject; + Component component = null; + GroupDefinition currentGroup = null; + GroupDefinition updatedGroup = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testUpdateGroup() throws Exception { + GroupBusinessLogic testSubject; + Component component = null; + GroupDefinition updatedGroup = null; + String currentGroupName = ""; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateAndUpdateGroupProperties() throws Exception { + GroupBusinessLogic testSubject; + String componentId = ""; + String groupUniqueId = ""; + User user = null; + ComponentTypeEnum componentType = null; + List groupPropertiesToUpdate = null; + boolean inTransaction = false; + Either, ResponseFormat> result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testResetEmptyValueWithDefaults() throws Exception { + GroupBusinessLogic testSubject;List groupPropertiesToUpdate = null; + GroupDefinition originalGroup = null; + + + // default test + } + + + @Test + public void testValidateGroupPropertyAndResetEmptyValue() throws Exception { + GroupBusinessLogic testSubject;GroupDefinition originalGroup = null; + List groupPropertiesToUpdate = null; + Either,ResponseFormat> result; + + // default test + testSubject=createTestSubject(); + } + + + @Test + public void testValidatePropertyBusinessLogic() throws Exception { + GroupBusinessLogic testSubject;List groupPropertiesToUpdate = null; + GroupDefinition originalGroup = null; + Either,ResponseFormat> result; + + // default test + testSubject=createTestSubject(); + } + + + @Test + public void testPrepareMapWithOriginalProperties() throws Exception { + GroupBusinessLogic testSubject; + GroupDefinition originalGroup = null; + Map result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateOnlyValueChanged() throws Exception { + GroupBusinessLogic testSubject;List groupPropertiesToUpdate = null; + GroupDefinition originalGroup = null; + Either,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 result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateAndUpdateGroupName() throws Exception { + GroupBusinessLogic testSubject; + GroupDefinition currentGroup = null; + GroupDefinition groupUpdate = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateGroupName() throws Exception { + GroupBusinessLogic testSubject; + String currentGroupName = ""; + String groupUpdateName = ""; + boolean isforceNameModification = false; + Either 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 result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testFindGroupOnComponent() throws Exception { + GroupBusinessLogic testSubject; + Component component = null; + String groupId = ""; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateGroupsBeforeUpdate() throws Exception { + GroupBusinessLogic testSubject;String componentId = ""; + String userId = ""; + ComponentTypeEnum componentType = null; + List groups = null; + boolean inTransaction = false; + Either result; + + // default test + testSubject=createTestSubject(); + } + + + @Test + public void testValidateGroupsInComponentByFunc() throws Exception { + GroupBusinessLogic testSubject;List groups = null; + Component component = null; + Function getByParam = null; + ResponseFormat result; + + // default test + testSubject=createTestSubject(); + } + + + @Test + public void testGetAsString() throws Exception { + GroupBusinessLogic testSubject; + List list = null; + String result; + + // test 1 + testSubject = createTestSubject(); + list = null; + + + } + + + @Test + public void testUpdateGroupPropertiesValue() throws Exception { + GroupBusinessLogic testSubject;String componentId = ""; + GroupDefinition currentGroup = null; + List groupPropertyToUpdate = null; + boolean inTransaction = false; + Either,ResponseFormat> result; + + // default test + testSubject=createTestSubject(); + } + + + @Test + public void testValidateGenerateVfModuleGroupNames() throws Exception { + GroupBusinessLogic testSubject; + List allGroups = null; + String resourceSystemName = ""; + int startGroupCounter = 0; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateGenerateVfModuleGroupName() throws Exception { + GroupBusinessLogic testSubject; + String resourceSystemName = ""; + String description = ""; + int groupCounter = 0; + Either 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 groups = null; + String resourceSystemName = ""; + Either, ResponseFormat> result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testGetNextVfModuleNameCounter() throws Exception { + GroupBusinessLogic testSubject; + Map groups = null; + int result; + + // test 1 + testSubject = createTestSubject(); + groups = null; + + + } + + + @Test + public void testGetNextVfModuleNameCounter_1() throws Exception { + GroupBusinessLogic testSubject; + Collection groups = null; + int result; + + // test 1 + testSubject = createTestSubject(); + groups = null; + + + } + + + @Test + public void testValidateUpdateVfGroupNamesOnGraph() throws Exception { + GroupBusinessLogic testSubject; + List groups = null; + Component component = null; + boolean inTransaction = false; + Either, 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 result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testFindComponentInstanceAndGroupInstanceOnComponent() throws Exception { + GroupBusinessLogic testSubject; + Component component = null; + String componentInstanceId = ""; + String groupInstId = ""; + Either, StorageOperationStatus> result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testGetLatestIntProperty() throws Exception { + GroupBusinessLogic testSubject;Map newValues = null; + Map parentValues = null; + PropertyNames propertyKey = null; + int result; + + // default test + testSubject=createTestSubject(); + } + + + @Test + public void testIsPropertyChanged() throws Exception { + GroupBusinessLogic testSubject;Map newValues = null; + Map parentValues = null; + PropertyNames minInstances = null; + boolean result; + + // default test + testSubject=createTestSubject(); + } + + + @Test + public void testValidateMinMaxAndInitialCountPropertyLogicVF() throws Exception { + GroupBusinessLogic testSubject;Map newValues = null; + Map parentValues = null; + Either result; + + // default test + testSubject=createTestSubject(); + } + + + @Test + public void testValidateMinMaxAndInitialCountPropertyLogic() throws Exception { + GroupBusinessLogic testSubject;Map newValues = null; + Map currValues = null; + Map parentValues = null; + Either result; + + // default test + testSubject=createTestSubject(); + } + + + @Test + public void testValidateValueInRange() throws Exception { + GroupBusinessLogic testSubject;ImmutablePair newValue = null; + ImmutablePair min = null; + ImmutablePair max = null; + Either 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 newProperties = null; + boolean inTransaction = false; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateReduceGroupInstancePropertiesBeforeUpdate() throws Exception { + GroupBusinessLogic testSubject;GroupInstance oldGroupInstance = null; + List newProperties = null; + Either,ResponseFormat> result; + + // default test + testSubject=createTestSubject(); + } + + + @Test + public void testFillValuesAndParentValuesFromExistingProperties() throws Exception { + GroupBusinessLogic testSubject;Map existingProperties = null; + Map propertyValues = null; + Map parentPropertyValues = null; + + + // default test + } + + + @Test + public void testHandleAndAddProperty() throws Exception { + GroupBusinessLogic testSubject;List reducedProperties = null; + Map newPropertyValues = null; + GroupInstanceProperty currNewProperty = null; + GroupInstanceProperty currExistingProperty = null; + Either 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 reducedProperties = null; + PropertyNames propertyName = null; + Map 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 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 groupDefinitions = null; + Either, 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 groupDefinitions = null; + Either, 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 groupDefinitions = null; + Either, ResponseFormat> result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testUpdateGroups() throws Exception { + GroupBusinessLogic testSubject; + Component component = null; + ComponentTypeEnum componentType = null; + List groupDefinitions = null; + Either, 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 allDAtaTypes = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testHandleProperty() throws Exception { + GroupBusinessLogic testSubject; + GroupProperty groupProperty = null; + PropertyDefinition prop = null; + Integer index = 0; + Map allDataTypes = null; + Either 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, 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, 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, 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 dataParamsToReturn = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testCreateProduct() throws Exception { + ProductBusinessLogic testSubject; + Product product = null; + User user = null; + Either 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 result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateProductFieldsBeforeCreate() throws Exception { + ProductBusinessLogic testSubject; + User user = null; + Product product = null; + AuditingActionEnum actionEnum = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateAndUpdateProductContactsList() throws Exception { + ProductBusinessLogic testSubject; + User user = null; + Product product = null; + AuditingActionEnum actionEnum = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateGrouping() throws Exception { + ProductBusinessLogic testSubject; + User user = null; + Product product = null; + AuditingActionEnum actionEnum = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testGetProduct() throws Exception { + ProductBusinessLogic testSubject; + String productId = ""; + User user = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testDeleteProduct() throws Exception { + ProductBusinessLogic testSubject; + String productId = ""; + User user = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateProductFullNameAndCleanup() throws Exception { + ProductBusinessLogic testSubject; + User user = null; + Product product = null; + AuditingActionEnum actionEnum = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateProductNameAndCleanup() throws Exception { + ProductBusinessLogic testSubject; + User user = null; + Product product = null; + AuditingActionEnum actionEnum = null; + Either 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 result; + + // default test + testSubject = createTestSubject(); + } + + + @Test + public void testUpdateProductMetadata() throws Exception { + ProductBusinessLogic testSubject; + String productId = ""; + Product updatedProduct = null; + User user = null; + Either 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 result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateAndUpdateProductName() throws Exception { + ProductBusinessLogic testSubject; + User user = null; + Product currentProduct = null; + Product updatedProduct = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateAndUpdateFullName() throws Exception { + ProductBusinessLogic testSubject; + User user = null; + Product currentProduct = null; + Product updatedProduct = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateAndUpdateCategory() throws Exception { + ProductBusinessLogic testSubject; + User user = null; + Product currentProduct = null; + Product updatedProduct = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateAndUpdateContactList() throws Exception { + ProductBusinessLogic testSubject; + User user = null; + Product currentProduct = null; + Product updatedProduct = null; + Either result; + + // default test + testSubject = createTestSubject(); + + } + + + @Test + public void testValidateAndUpdateTags() throws Exception { + ProductBusinessLogic testSubject; + User user = null; + Product currentProduct = null; + Product updatedProduct = null; + Either 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 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,ResponseFormat> result; + + // default test + } + + + @Test + public void testValidateResourceNameExists() throws Exception { + ResourceBusinessLogic testSubject;String resourceName = ""; + ResourceTypeEnum resourceTypeEnum = null; + String userId = ""; + Either,ResponseFormat> result; + + // default test + } + + + @Test + public void testCreateResource() throws Exception { + ResourceBusinessLogic testSubject;Resource resource = null; + AuditingActionEnum auditingAction = null; + User user = null; + Map csarUIPayload = null; + String payloadName = ""; + Either 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 csarUIPayload = null; + String payloadName = ""; + String resourceUniqueId = ""; + Either 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,StorageOperationStatus> csarUIPayload = null; + String csarUUID = ""; + Either result; + + // test 1 + testSubject=createTestSubject();csarUIPayload = null; + } + + + + + + + + @Test + public void testCreateResourcesFromYamlNodeTypesList() throws Exception { + ResourceBusinessLogic testSubject;String yamlName = ""; + Resource resource = null; + Map mappedToscaTemplate = null; + boolean needLock = false; + Map>> nodeTypesArtifactsToHandle = null; + List nodeTypesNewCreatedArtifacts = null; + Map nodeTypesInfo = null; + CsarInfo csarInfo = null; + Either,ResponseFormat> result; + + // default test + } + + + + + + + @Test + public void testValidateResourceCreationFromNodeType() throws Exception { + ResourceBusinessLogic testSubject;Resource resource = null; + User creator = null; + Either 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> nodeTypeArtifactsToHandle = null; + List nodeTypesNewCreatedArtifacts = null; + boolean forceCertificationAllowed = false; + CsarInfo csarInfo = null; + Either,ResponseFormat> result; + + // default test + } } -- cgit 1.2.3-korg