aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src/test
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2020-02-07 10:14:06 +0000
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-03-22 12:47:42 +0000
commit1a64c83fc436e17f93e468f7d46ff9f5fcb081ce (patch)
tree835abbeb362b01216df6549233d48745b9c19bb4 /catalog-model/src/test
parent6329f959f27920179604e1a015003a0f6614bd97 (diff)
Add support for simple yaml profile 1.2
Change-Id: I735d25c6b6c3344c4b742f09b3aeaf4d03c2d17c Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2738
Diffstat (limited to 'catalog-model/src/test')
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/ResourceTest.java744
1 files changed, 326 insertions, 418 deletions
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
index c53e4e00bb..bb72c53033 100644
--- 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
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,421 +28,329 @@ import org.junit.Test;
import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
import org.openecomp.sdc.be.unittests.utils.ModelConfDependentTest;
-public class ResourceTest extends ModelConfDependentTest{
-
- private Resource createTestSubject() {
- return new Resource();
- }
-
- @Test
- public void testCtor() throws Exception {
- ComponentMetadataDefinition componentMetadataDefinition = new ResourceMetadataDefinition();
- new Resource(componentMetadataDefinition);
- }
-
- @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 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();
- result = testSubject.equals(obj);
- Assert.assertEquals(false, result);
- obj = new Object();
- result = testSubject.equals(obj);
- Assert.assertEquals(false, result);
- result = testSubject.equals(testSubject);
- Assert.assertEquals(true, result);
-
- Resource testSubject2 = createTestSubject();
- result = testSubject.equals(testSubject2);
- Assert.assertEquals(true, 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 testFetchGenericTypeToscaNameFromConfig() throws Exception {
- Resource testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.fetchGenericTypeToscaNameFromConfig();
- }
-
- @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();
- }
-
- @Test
- public void testGroupRelationsByInstanceName() throws Exception {
- Resource testSubject;
- Map<String, List<RequirementCapabilityRelDef>> result;
-
- // default test
- testSubject = createTestSubject();
- Resource resource = new Resource();
- resource.setComponentInstancesRelations(new LinkedList<RequirementCapabilityRelDef>());
- result = testSubject.groupRelationsFromCsarByInstanceName(resource);
- }
+public class ResourceTest extends ModelConfDependentTest {
+
+ private Resource createTestSubject() {
+ return new Resource();
+ }
+
+ @Test
+ public void testCtor() throws Exception {
+ ComponentMetadataDefinition componentMetadataDefinition = new ResourceMetadataDefinition();
+ new Resource(componentMetadataDefinition);
+ }
+
+ @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 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 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();
+ result = testSubject.equals(obj);
+ Assert.assertEquals(false, result);
+ obj = new Object();
+ result = testSubject.equals(obj);
+ Assert.assertEquals(false, result);
+ result = testSubject.equals(testSubject);
+ Assert.assertEquals(true, result);
+
+ Resource testSubject2 = createTestSubject();
+ result = testSubject.equals(testSubject2);
+ Assert.assertEquals(true, 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 testFetchGenericTypeToscaNameFromConfig() throws Exception {
+ Resource testSubject;
+ String result;
+
+ // default test
+ testSubject = createTestSubject();
+ result = testSubject.fetchGenericTypeToscaNameFromConfig();
+ }
+
+ @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();
+ }
+
+ @Test
+ public void testGroupRelationsByInstanceName() throws Exception {
+ Resource testSubject;
+ Map<String, List<RequirementCapabilityRelDef>> result;
+
+ // default test
+ testSubject = createTestSubject();
+ Resource resource = new Resource();
+ resource.setComponentInstancesRelations(new LinkedList<RequirementCapabilityRelDef>());
+ result = testSubject.groupRelationsFromCsarByInstanceName(resource);
+ }
}