aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src/test/java/org/openecomp
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2018-04-26 15:48:26 +0300
committerYuli Shlosberg <ys9693@att.com>2018-04-27 08:36:59 +0300
commite4669311978a91e4af8f079fb10e5aaaff4fef14 (patch)
tree82b7ae73664423cc337283b15950fd30b782ec81 /catalog-model/src/test/java/org/openecomp
parent1a5cc6ecb2e1a59c024b1bcd4b86d442e24dc300 (diff)
new unit tests for be and model
Change-Id: Ia0cb140eb512320871724d782b35a2318184f42c Issue-ID: SDC-1170 Signed-off-by: Yuli Shlosberg <ys9693@att.com>
Diffstat (limited to 'catalog-model/src/test/java/org/openecomp')
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/ComponentParametersViewTest.java488
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceTest.java420
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/ServiceTest.java253
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/cache/ComponentCacheTest.java88
4 files changed, 1249 insertions, 0 deletions
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/ComponentParametersViewTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ComponentParametersViewTest.java
new file mode 100644
index 0000000000..2861ecd2c9
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ComponentParametersViewTest.java
@@ -0,0 +1,488 @@
+package org.openecomp.sdc.be.model;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+
+public class ComponentParametersViewTest {
+
+ private ComponentParametersView createTestSubject() {
+ return new ComponentParametersView();
+ }
+
+
+ @Test
+ public void testFilter() throws Exception {
+ ComponentParametersView testSubject;
+ Component component = null;
+ ComponentTypeEnum componentType = ComponentTypeEnum.RESOURCE;
+ Component result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.filter(component, componentType);
+ }
+
+
+ @Test
+ public void testDisableAll() throws Exception {
+ ComponentParametersView testSubject;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.disableAll();
+ }
+
+
+ @Test
+ public void testIsIgnoreGroups() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreGroups();
+ }
+
+
+ @Test
+ public void testSetIgnoreGroups() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreGroups = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreGroups(ignoreGroups);
+ }
+
+
+ @Test
+ public void testIsIgnoreComponentInstances() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreComponentInstances();
+ }
+
+
+ @Test
+ public void testSetIgnoreComponentInstances() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreComponentInstances = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreComponentInstances(ignoreComponentInstances);
+ }
+
+
+ @Test
+ public void testIsIgnoreProperties() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreProperties();
+ }
+
+
+ @Test
+ public void testSetIgnoreProperties() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreProperties = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreProperties(ignoreProperties);
+ }
+
+
+ @Test
+ public void testIsIgnoreCapabilities() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreCapabilities();
+ }
+
+
+ @Test
+ public void testSetIgnoreCapabilities() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreCapabilities = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreCapabilities(ignoreCapabilities);
+ }
+
+
+ @Test
+ public void testIsIgnoreRequirements() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreRequirements();
+ }
+
+
+ @Test
+ public void testSetIgnoreRequirements() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreRequirements = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreRequirements(ignoreRequirements);
+ }
+
+
+ @Test
+ public void testIsIgnoreCategories() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreCategories();
+ }
+
+
+ @Test
+ public void testSetIgnoreCategories() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreCategories = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreCategories(ignoreCategories);
+ }
+
+
+ @Test
+ public void testIsIgnoreAllVersions() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreAllVersions();
+ }
+
+
+ @Test
+ public void testSetIgnoreAllVersions() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreAllVersions = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreAllVersions(ignoreAllVersions);
+ }
+
+
+ @Test
+ public void testIsIgnoreAdditionalInformation() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreAdditionalInformation();
+ }
+
+
+ @Test
+ public void testSetIgnoreAdditionalInformation() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreAdditionalInformation = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreAdditionalInformation(ignoreAdditionalInformation);
+ }
+
+
+ @Test
+ public void testIsIgnoreArtifacts() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreArtifacts();
+ }
+
+
+ @Test
+ public void testSetIgnoreArtifacts() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreArtifacts = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreArtifacts(ignoreArtifacts);
+ }
+
+
+ @Test
+ public void testIsIgnoreComponentInstancesProperties() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreComponentInstancesProperties();
+ }
+
+
+ @Test
+ public void testSetIgnoreComponentInstancesProperties() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreComponentInstancesProperties = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreComponentInstancesProperties(ignoreComponentInstancesProperties);
+ }
+
+
+ @Test
+ public void testIsIgnoreComponentInstancesInputs() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreComponentInstancesInputs();
+ }
+
+
+ @Test
+ public void testSetIgnoreComponentInstancesInputs() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreComponentInstancesInputs = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreComponentInstancesInputs(ignoreComponentInstancesInputs);
+ }
+
+
+ @Test
+ public void testIsIgnoreInterfaces() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreInterfaces();
+ }
+
+
+ @Test
+ public void testSetIgnoreInterfaces() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreInterfaces = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreInterfaces(ignoreInterfaces);
+ }
+
+
+ @Test
+ public void testIsIgnoreAttributesFrom() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreAttributesFrom();
+ }
+
+
+ @Test
+ public void testSetIgnoreAttributesFrom() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreAttributesFrom = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreAttributesFrom(ignoreAttributesFrom);
+ }
+
+
+ @Test
+ public void testIsIgnoreComponentInstancesAttributesFrom() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreComponentInstancesAttributesFrom();
+ }
+
+
+ @Test
+ public void testSetIgnoreComponentInstancesAttributesFrom() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreComponentInstancesAttributesFrom = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreComponentInstancesAttributesFrom(ignoreComponentInstancesAttributesFrom);
+ }
+
+
+ @Test
+ public void testIsIgnoreDerivedFrom() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreDerivedFrom();
+ }
+
+
+ @Test
+ public void testSetIgnoreDerivedFrom() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreDerivedFrom = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreDerivedFrom(ignoreDerivedFrom);
+ }
+
+
+ @Test
+ public void testIsIgnoreUsers() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreUsers();
+ }
+
+
+ @Test
+ public void testSetIgnoreUsers() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreUsers = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreUsers(ignoreUsers);
+ }
+
+
+ @Test
+ public void testIsIgnoreInputs() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreInputs();
+ }
+
+
+ @Test
+ public void testSetIgnoreInputs() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreInputs = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreInputs(ignoreInputs);
+ }
+
+
+ @Test
+ public void testIsIgnoreCapabiltyProperties() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreCapabiltyProperties();
+ }
+
+
+ @Test
+ public void testSetIgnoreCapabiltyProperties() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreCapabiltyProperties = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreCapabiltyProperties(ignoreCapabiltyProperties);
+ }
+
+
+ @Test
+ public void testIsIgnoreForwardingPath() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnoreForwardingPath();
+ }
+
+
+ @Test
+ public void testSetIgnoreForwardingPath() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignoreServicePath = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnoreForwardingPath(ignoreServicePath);
+ }
+
+
+ @Test
+ public void testIsIgnorePolicies() throws Exception {
+ ComponentParametersView testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isIgnorePolicies();
+ }
+
+
+ @Test
+ public void testSetIgnorePolicies() throws Exception {
+ ComponentParametersView testSubject;
+ boolean ignorePolicies = false;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setIgnorePolicies(ignorePolicies);
+ }
+
+
+ @Test
+ public void testDetectParseFlag() throws Exception {
+ ComponentParametersView testSubject;
+ JsonParseFlagEnum result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.detectParseFlag();
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceTest.java
new file mode 100644
index 0000000000..0814a6f30f
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceTest.java
@@ -0,0 +1,420 @@
+package org.openecomp.sdc.be.model;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.sdc.be.datatypes.elements.InterfaceOperationDataDefinition;
+import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
+
+public class ResourceTest {
+
+ private Resource createTestSubject() {
+ return new Resource();
+ }
+
+
+ @Test
+ public void testGetDerivedFrom() throws Exception {
+ Resource testSubject;
+ List<String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getDerivedFrom();
+ }
+
+
+ @Test
+ public void testSetDerivedFrom() throws Exception {
+ Resource testSubject;
+ List<String> derivedFrom = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setDerivedFrom(derivedFrom);
+ }
+
+
+ @Test
+ public void testGetDerivedList() throws Exception {
+ Resource testSubject;
+ List<String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getDerivedList();
+ }
+
+
+ @Test
+ public void testSetDerivedList() throws Exception {
+ Resource testSubject;
+ List<String> derivedList = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setDerivedList(derivedList);
+ }
+
+
+ @Test
+ public void testGetProperties() throws Exception {
+ Resource testSubject;
+ List<PropertyDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getProperties();
+ }
+
+
+ @Test
+ public void testSetProperties() throws Exception {
+ Resource testSubject;
+ List<PropertyDefinition> properties = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setProperties(properties);
+ }
+
+
+ @Test
+ public void testGetAttributes() throws Exception {
+ Resource testSubject;
+ List<PropertyDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getAttributes();
+ }
+
+
+ @Test
+ public void testSetAttributes() throws Exception {
+ Resource testSubject;
+ List<PropertyDefinition> attributes = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setAttributes(attributes);
+ }
+
+
+ @Test
+ public void testGetInterfaces() throws Exception {
+ Resource testSubject;
+ Map<String, InterfaceDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getInterfaces();
+ }
+
+
+ @Test
+ public void testSetInterfaces() throws Exception {
+ Resource testSubject;
+ Map<String, InterfaceDefinition> interfaces = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setInterfaces(interfaces);
+ }
+
+
+ @Test
+ public void testIsAbstract() throws Exception {
+ Resource testSubject;
+ Boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isAbstract();
+ }
+
+
+ @Test
+ public void testSetAbstract() throws Exception {
+ Resource testSubject;
+ Boolean isAbstract = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setAbstract(isAbstract);
+ }
+
+
+ @Test
+ public void testGetDefaultCapabilities() throws Exception {
+ Resource testSubject;
+ List<String> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getDefaultCapabilities();
+ }
+
+
+ @Test
+ public void testSetDefaultCapabilities() throws Exception {
+ Resource testSubject;
+ List<String> defaultCapabilities = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setDefaultCapabilities(defaultCapabilities);
+ }
+
+
+ @Test
+ public void testGetCost() throws Exception {
+ Resource testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getCost();
+ }
+
+
+ @Test
+ public void testSetCost() throws Exception {
+ Resource testSubject;
+ String cost = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setCost(cost);
+ }
+
+
+ @Test
+ public void testGetLicenseType() throws Exception {
+ Resource testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getLicenseType();
+ }
+
+
+ @Test
+ public void testSetLicenseType() throws Exception {
+ Resource testSubject;
+ String licenseType = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setLicenseType(licenseType);
+ }
+
+
+ @Test
+ public void testGetInterfaceOperations() throws Exception {
+ Resource testSubject;
+ Map<String, InterfaceOperationDataDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getInterfaceOperations();
+ }
+
+
+ @Test
+ public void testSetInterfaceOperations() throws Exception {
+ Resource testSubject;
+ Map<String, InterfaceOperationDataDefinition> interfaceOperations = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setInterfaceOperations(interfaceOperations);
+ }
+
+
+ @Test
+ public void testHashCode() throws Exception {
+ Resource testSubject;
+ int result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.hashCode();
+ }
+
+
+ @Test
+ public void testEquals() throws Exception {
+ Resource testSubject;
+ Object obj = null;
+ boolean result;
+
+ // test 1
+ testSubject = createTestSubject();
+ obj = null;
+ result = testSubject.equals(obj);
+ Assert.assertEquals(false, result);
+ }
+
+
+ @Test
+ public void testToString() throws Exception {
+ Resource testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.toString();
+ }
+
+
+ @Test
+ public void testGetToscaResourceName() throws Exception {
+ Resource testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getToscaResourceName();
+ }
+
+
+ @Test
+ public void testSetToscaResourceName() throws Exception {
+ Resource testSubject;
+ String toscaResourceName = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setToscaResourceName(toscaResourceName);
+ }
+
+
+ @Test
+ public void testGetResourceType() throws Exception {
+ Resource testSubject;
+ ResourceTypeEnum result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getResourceType();
+ }
+
+
+ @Test
+ public void testSetResourceType() throws Exception {
+ Resource testSubject;
+ ResourceTypeEnum resourceType = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setResourceType(resourceType);
+ }
+
+
+ @Test
+ public void testSetVendorName() throws Exception {
+ Resource testSubject;
+ String vendorName = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setVendorName(vendorName);
+ }
+
+
+ @Test
+ public void testSetVendorRelease() throws Exception {
+ Resource testSubject;
+ String vendorRelease = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setVendorRelease(vendorRelease);
+ }
+
+
+ @Test
+ public void testSetResourceVendorModelNumber() throws Exception {
+ Resource testSubject;
+ String resourceVendorModelNumber = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setResourceVendorModelNumber(resourceVendorModelNumber);
+ }
+
+
+ @Test
+ public void testGetVendorName() throws Exception {
+ Resource testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getVendorName();
+ }
+
+
+ @Test
+ public void testGetVendorRelease() throws Exception {
+ Resource testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getVendorRelease();
+ }
+
+
+ @Test
+ public void testGetResourceVendorModelNumber() throws Exception {
+ Resource testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getResourceVendorModelNumber();
+ }
+
+
+ @Test
+ public void testAssetType() throws Exception {
+ Resource testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.assetType();
+ }
+
+
+ @Test
+ public void testShouldGenerateInputs() throws Exception {
+ Resource testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.shouldGenerateInputs();
+ }
+
+
+ @Test
+ public void testDeriveFromGeneric() throws Exception {
+ Resource testSubject;
+ boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.deriveFromGeneric();
+ }
+
+
+
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/ServiceTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ServiceTest.java
new file mode 100644
index 0000000000..ac2ad4d196
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/ServiceTest.java
@@ -0,0 +1,253 @@
+package org.openecomp.sdc.be.model;
+
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.datatypes.components.ServiceMetadataDataDefinition;
+import org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition;
+
+@Generated(value = "org.junit-tools-1.0.6")
+public class ServiceTest {
+
+ private Service createTestSubject() {
+ return new Service();
+ }
+
+
+ @Test
+ public void testGetServiceApiArtifacts() throws Exception {
+ Service testSubject;
+ Map<String, ArtifactDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getServiceApiArtifacts();
+ }
+
+
+ @Test
+ public void testSetServiceApiArtifacts() throws Exception {
+ Service testSubject;
+ Map<String, ArtifactDefinition> serviceApiArtifacts = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setServiceApiArtifacts(serviceApiArtifacts);
+ }
+
+
+ @Test
+ public void testGetProjectCode() throws Exception {
+ Service testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getProjectCode();
+ }
+
+
+ @Test
+ public void testGetForwardingPaths() throws Exception {
+ Service testSubject;
+ Map<String, ForwardingPathDataDefinition> result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getForwardingPaths();
+ }
+
+
+ @Test
+ public void testSetForwardingPaths() throws Exception {
+ Service testSubject;
+ Map<String, ForwardingPathDataDefinition> forwardingPaths = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setForwardingPaths(forwardingPaths);
+ }
+
+
+ @Test
+ public void testAddForwardingPath() throws Exception {
+ Service testSubject;
+ ForwardingPathDataDefinition forwardingPathDataDefinition = new ForwardingPathDataDefinition();
+ ForwardingPathDataDefinition result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.addForwardingPath(forwardingPathDataDefinition);
+ }
+
+
+ @Test
+ public void testSetProjectCode() throws Exception {
+ Service testSubject;
+ String projectName = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setProjectCode(projectName);
+ }
+
+
+ @Test
+ public void testGetDistributionStatus() throws Exception {
+ Service testSubject;
+ DistributionStatusEnum result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getDistributionStatus();
+ }
+
+
+ @Test
+ public void testSetDistributionStatus() throws Exception {
+ Service testSubject;
+ DistributionStatusEnum distributionStatus = null;
+
+ // test 1
+ testSubject = createTestSubject();
+ distributionStatus = null;
+ testSubject.setDistributionStatus(distributionStatus);
+ }
+
+
+ @Test
+ public void testSetEcompGeneratedNaming() throws Exception {
+ Service testSubject;
+ Boolean ecompGeneratedNaming = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setEcompGeneratedNaming(ecompGeneratedNaming);
+ }
+
+
+ @Test
+ public void testIsEcompGeneratedNaming() throws Exception {
+ Service testSubject;
+ Boolean result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.isEcompGeneratedNaming();
+ }
+
+
+ @Test
+ public void testSetNamingPolicy() throws Exception {
+ Service testSubject;
+ String namingPolicy = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setNamingPolicy(namingPolicy);
+ }
+
+
+ @Test
+ public void testGetNamingPolicy() throws Exception {
+ Service testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getNamingPolicy();
+ }
+
+
+ @Test
+ public void testGetEnvironmentContext() throws Exception {
+ Service testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getEnvironmentContext();
+ }
+
+
+ @Test
+ public void testSetEnvironmentContext() throws Exception {
+ Service testSubject;
+ String environmentContext = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setEnvironmentContext(environmentContext);
+ }
+
+
+ @Test
+ public void testSetServiceType() throws Exception {
+ Service testSubject;
+ String serviceType = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setServiceType(serviceType);
+ }
+
+
+ @Test
+ public void testGetServiceType() throws Exception {
+ Service testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getServiceType();
+ }
+
+
+ @Test
+ public void testSetServiceRole() throws Exception {
+ Service testSubject;
+ String serviceRole = "";
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setServiceRole(serviceRole);
+ }
+
+
+ @Test
+ public void testGetServiceRole() throws Exception {
+ Service testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.getServiceRole();
+ }
+
+
+
+
+
+ @Test
+ public void testToString() throws Exception {
+ Service testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.toString();
+ }
+
+
+ @Test
+ public void testSetSpecificComponetTypeArtifacts() throws Exception {
+ Service testSubject;
+ Map<String, ArtifactDefinition> specificComponentTypeArtifacts = null;
+
+ // default test
+ testSubject = createTestSubject();
+ testSubject.setSpecificComponetTypeArtifacts(specificComponentTypeArtifacts);
+ }
+} \ No newline at end of file
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/cache/ComponentCacheTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/cache/ComponentCacheTest.java
new file mode 100644
index 0000000000..5a98146832
--- /dev/null
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/cache/ComponentCacheTest.java
@@ -0,0 +1,88 @@
+package org.openecomp.sdc.be.model.cache;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.function.Function;
+
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.ImmutableTriple;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.sdc.be.config.Configuration;
+import org.openecomp.sdc.be.dao.api.ActionStatus;
+import org.openecomp.sdc.be.dao.cassandra.ComponentCassandraDao;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
+import org.openecomp.sdc.be.model.Component;
+import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade;
+import org.openecomp.sdc.be.resources.data.ComponentCacheData;
+import org.slf4j.Logger;
+
+import fj.data.Either;
+
+public class ComponentCacheTest {
+ ComponentCassandraDao componentCassandraDao = Mockito.mock(ComponentCassandraDao.class);
+
+ ToscaOperationFacade toscaOperationFacade = Mockito.mock(ToscaOperationFacade.class);
+ Configuration configuration = Mockito.mock(Configuration.class);
+
+ Logger logger = Mockito.mock(Logger.class);
+
+ @InjectMocks
+ ComponentCache componentCache = new ComponentCache();
+
+ private ComponentCache createTestSubject() {
+ return componentCache;
+ }
+
+ @Before
+ public void initMocks() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+
+
+
+ @Test
+ public void testIsEnabled() throws Exception {
+ boolean result;
+
+ // default test
+ result = componentCache.isEnabled();
+ }
+
+ @Test
+ public void testSetEnabled() throws Exception {
+ boolean enabled = false;
+
+ // default test
+ componentCache.setEnabled(enabled);
+ }
+
+
+
+ @Test
+ public void testGetAllComponentIdTimeAndType() throws Exception {
+ Either<List<ComponentCacheData>, ActionStatus> result;
+
+ // default test
+ result = componentCache.getAllComponentIdTimeAndType();
+ }
+
+
+ @Test
+ public void testDeleteComponentFromCache() throws Exception {
+ ComponentCache testSubject;
+ String id = "";
+ ActionStatus result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.deleteComponentFromCache(id);
+ }
+} \ No newline at end of file