diff options
author | Ofir Sonsino <os0695@att.com> | 2017-10-09 11:08:05 +0300 |
---|---|---|
committer | Ofir Sonsino <os0695@att.com> | 2017-10-09 11:08:05 +0300 |
commit | 78028f3b588241200e31b71b8190e9926af626e9 (patch) | |
tree | 4cc4969710b9f815f382f5e387f2da1bf404703a | |
parent | 3274b39fef63c43c6eeb202e98b71b01e0f714ff (diff) |
Improve SONAR coverage
Change-Id: Ib36c2e6df9fe100a301b89769078c7a06d3a9ae5
Issue-ID: VID-72
Signed-off-by: Ofir Sonsino <os0695@att.com>
59 files changed, 4555 insertions, 10 deletions
diff --git a/vid-app-common/src/test/java/org/openecomp/aai/util/JettyObfuscationConversionCommandLineUtilTest.java b/vid-app-common/src/test/java/org/openecomp/aai/util/JettyObfuscationConversionCommandLineUtilTest.java new file mode 100644 index 00000000..f72a2825 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/aai/util/JettyObfuscationConversionCommandLineUtilTest.java @@ -0,0 +1,21 @@ +package org.openecomp.aai.util; + +import org.junit.Test; + +public class JettyObfuscationConversionCommandLineUtilTest { + + private JettyObfuscationConversionCommandLineUtil createTestSubject() { + return new JettyObfuscationConversionCommandLineUtil(); + } + + + @Test + public void testMain() throws Exception { + String[] args = new String[] { "" }; + + // default test + JettyObfuscationConversionCommandLineUtil.main(args); + } + + +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/aai/util/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/aai/util/TestSuite.java new file mode 100644 index 00000000..f7d57ad7 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/aai/util/TestSuite.java @@ -0,0 +1,11 @@ +package org.openecomp.aai.util; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( + +{ JettyObfuscationConversionCommandLineUtilTest.class }) +public class TestSuite { // nothing +} diff --git a/vid-app-common/src/test/java/org/openecomp/vid/aai/AaiGetVnfResponseTest.java b/vid-app-common/src/test/java/org/openecomp/vid/aai/AaiGetVnfResponseTest.java new file mode 100644 index 00000000..b959709d --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/aai/AaiGetVnfResponseTest.java @@ -0,0 +1,33 @@ +package org.openecomp.vid.aai; + +import java.util.Map; + +import org.junit.Test; + +public class AaiGetVnfResponseTest { + + private AaiGetVnfResponse createTestSubject() { + return new AaiGetVnfResponse(); + } + + @Test + public void testGetAdditionalProperties() throws Exception { + AaiGetVnfResponse testSubject; + Map<String, Object> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getAdditionalProperties(); + } + + @Test + public void testSetAdditionalProperty() throws Exception { + AaiGetVnfResponse testSubject; + String name = ""; + Object value = null; + + // default test + testSubject = createTestSubject(); + testSubject.setAdditionalProperty(name, value); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/aai/ServicePropertiesTest.java b/vid-app-common/src/test/java/org/openecomp/vid/aai/ServicePropertiesTest.java new file mode 100644 index 00000000..d3c50aff --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/aai/ServicePropertiesTest.java @@ -0,0 +1,33 @@ +package org.openecomp.vid.aai; + +import java.util.Map; + +import org.junit.Test; + +public class ServicePropertiesTest { + + private ServiceProperties createTestSubject() { + return new ServiceProperties(); + } + + @Test + public void testGetAdditionalProperties() throws Exception { + ServiceProperties testSubject; + Map<String, Object> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getAdditionalProperties(); + } + + @Test + public void testSetAdditionalProperty() throws Exception { + ServiceProperties testSubject; + String name = ""; + Object value = null; + + // default test + testSubject = createTestSubject(); + testSubject.setAdditionalProperty(name, value); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/aai/SubscriberAaiResponseTest.java b/vid-app-common/src/test/java/org/openecomp/vid/aai/SubscriberAaiResponseTest.java new file mode 100644 index 00000000..26954011 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/aai/SubscriberAaiResponseTest.java @@ -0,0 +1,22 @@ +package org.openecomp.vid.aai; + +import org.junit.Test; +import org.openecomp.vid.model.SubscriberList; + +public class SubscriberAaiResponseTest { + + private SubscriberAaiResponse createTestSubject() { + return new SubscriberAaiResponse(new SubscriberList(), "", 0); + } + + + @Test + public void testGetSubscriberList() throws Exception { + SubscriberAaiResponse testSubject; + SubscriberList result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getSubscriberList(); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/aai/SubscriberWithFilterTest.java b/vid-app-common/src/test/java/org/openecomp/vid/aai/SubscriberWithFilterTest.java new file mode 100644 index 00000000..7fca7c99 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/aai/SubscriberWithFilterTest.java @@ -0,0 +1,30 @@ +package org.openecomp.vid.aai; + +import org.junit.Test; + +public class SubscriberWithFilterTest { + + private SubscriberWithFilter createTestSubject() { + return new SubscriberWithFilter(); + } + + @Test + public void testGetIsPermitted() throws Exception { + SubscriberWithFilter testSubject; + boolean result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getIsPermitted(); + } + + @Test + public void testSetIsPermitted() throws Exception { + SubscriberWithFilter testSubject; + boolean isPermitted = false; + + // default test + testSubject = createTestSubject(); + testSubject.setIsPermitted(isPermitted); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/aai/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/aai/TestSuite.java new file mode 100644 index 00000000..0629d78c --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/aai/TestSuite.java @@ -0,0 +1,12 @@ +package org.openecomp.vid.aai; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( + +{ SubscriberAaiResponseTest.class, AaiGetVnfResponseTest.class, ServicePropertiesTest.class, + SubscriberWithFilterTest.class, VnfResultTest.class, org.openecomp.vid.aai.model.TestSuite.class }) +public class TestSuite { // nothing +} diff --git a/vid-app-common/src/test/java/org/openecomp/vid/aai/VnfResultTest.java b/vid-app-common/src/test/java/org/openecomp/vid/aai/VnfResultTest.java new file mode 100644 index 00000000..6efa05aa --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/aai/VnfResultTest.java @@ -0,0 +1,33 @@ +package org.openecomp.vid.aai; + +import java.util.Map; + +import org.junit.Test; + +public class VnfResultTest { + + private VnfResult createTestSubject() { + return new VnfResult(); + } + + @Test + public void testGetAdditionalProperties() throws Exception { + VnfResult testSubject; + Map<String, Object> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getAdditionalProperties(); + } + + @Test + public void testSetAdditionalProperty() throws Exception { + VnfResult testSubject; + String name = ""; + Object value = null; + + // default test + testSubject = createTestSubject(); + testSubject.setAdditionalProperty(name, value); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/aai/model/RelationshipTest.java b/vid-app-common/src/test/java/org/openecomp/vid/aai/model/RelationshipTest.java new file mode 100644 index 00000000..4f5e3353 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/aai/model/RelationshipTest.java @@ -0,0 +1,101 @@ +package org.openecomp.vid.aai.model; + +import java.util.List; + +import org.junit.Test; + + +public class RelationshipTest { + + private Relationship createTestSubject() { + return new Relationship(); + } + + + @Test + public void testGetRelatedTo() throws Exception { + Relationship testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getRelatedTo(); + } + + + @Test + public void testSetRelatedTo() throws Exception { + Relationship testSubject; + String relatedTo = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setRelatedTo(relatedTo); + } + + + @Test + public void testGetRelatedLink() throws Exception { + Relationship testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getRelatedLink(); + } + + + @Test + public void testSetRelatedLink() throws Exception { + Relationship testSubject; + String relatedLink = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setRelatedLink(relatedLink); + } + + + @Test + public void testGetRelationDataList() throws Exception { + Relationship testSubject; + List<RelationshipData> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getRelationDataList(); + } + + + @Test + public void testSetRelationDataList() throws Exception { + Relationship testSubject; + List<RelationshipData> relationDataList = null; + + // default test + testSubject = createTestSubject(); + testSubject.setRelationDataList(relationDataList); + } + + + @Test + public void testGetRelatedToPropertyList() throws Exception { + Relationship testSubject; + List<RelatedToProperty> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getRelatedToPropertyList(); + } + + + @Test + public void testSetRelatedToPropertyList() throws Exception { + Relationship testSubject; + List<RelatedToProperty> relatedToPropertyList = null; + + // default test + testSubject = createTestSubject(); + testSubject.setRelatedToPropertyList(relatedToPropertyList); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/aai/model/ServiceRelationshipsTest.java b/vid-app-common/src/test/java/org/openecomp/vid/aai/model/ServiceRelationshipsTest.java new file mode 100644 index 00000000..c67e3f8d --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/aai/model/ServiceRelationshipsTest.java @@ -0,0 +1,165 @@ +package org.openecomp.vid.aai.model; + +import org.junit.Test; + + +public class ServiceRelationshipsTest { + + private ServiceRelationships createTestSubject() { + return new ServiceRelationships(); + } + + + @Test + public void testGetServiceInstanceId() throws Exception { + ServiceRelationships testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getServiceInstanceId(); + } + + + @Test + public void testSetServiceInstanceId() throws Exception { + ServiceRelationships testSubject; + String serviceInstanceId = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setServiceInstanceId(serviceInstanceId); + } + + + @Test + public void testGetServiceInstanceName() throws Exception { + ServiceRelationships testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getServiceInstanceName(); + } + + + @Test + public void testSetServiceInstanceName() throws Exception { + ServiceRelationships testSubject; + String serviceInstanceName = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setServiceInstanceName(serviceInstanceName); + } + + + @Test + public void testGetModelInvariantId() throws Exception { + ServiceRelationships testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getModelInvariantId(); + } + + + @Test + public void testSetModelInvariantId() throws Exception { + ServiceRelationships testSubject; + String modelInvariantId = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setModelInvariantId(modelInvariantId); + } + + + @Test + public void testGetModelVersionId() throws Exception { + ServiceRelationships testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getModelVersionId(); + } + + + @Test + public void testSetModelVersionId() throws Exception { + ServiceRelationships testSubject; + String modelVersionId = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setModelVersionId(modelVersionId); + } + + + @Test + public void testGetResourceVersion() throws Exception { + ServiceRelationships testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getResourceVersion(); + } + + + @Test + public void testSetResourceVersion() throws Exception { + ServiceRelationships testSubject; + String resourceVersion = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setResourceVersion(resourceVersion); + } + + + @Test + public void testGetOrchestrationStatus() throws Exception { + ServiceRelationships testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getOrchestrationStatus(); + } + + + @Test + public void testSetOrchestrationStatus() throws Exception { + ServiceRelationships testSubject; + String orchestrationStatus = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setOrchestrationStatus(orchestrationStatus); + } + + + @Test + public void testGetRelationshipList() throws Exception { + ServiceRelationships testSubject; + RelationshipList result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getRelationshipList(); + } + + + @Test + public void testSetRelationshipList() throws Exception { + ServiceRelationships testSubject; + RelationshipList relationshipList = null; + + // default test + testSubject = createTestSubject(); + testSubject.setRelationshipList(relationshipList); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/aai/model/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/aai/model/TestSuite.java new file mode 100644 index 00000000..bb483627 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/aai/model/TestSuite.java @@ -0,0 +1,11 @@ +package org.openecomp.vid.aai.model; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( + +{ ServiceRelationshipsTest.class, RelationshipTest.class }) +public class TestSuite { // nothing +} diff --git a/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/ResourceTest.java b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/ResourceTest.java new file mode 100644 index 00000000..b7305600 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/ResourceTest.java @@ -0,0 +1,391 @@ +package org.openecomp.vid.asdc.beans; + +import java.util.Collection; + +import org.junit.Test; +import org.openecomp.vid.asdc.beans.Resource.LifecycleState; +import org.openecomp.vid.asdc.beans.Resource.Type; + + +public class ResourceTest { + + private Resource createTestSubject() { + return new Resource(); + } + + + @Test + public void testGetUuid() throws Exception { + Resource testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getUuid(); + } + + + @Test + public void testGetInvariantUUID() throws Exception { + Resource testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getInvariantUUID(); + } + + + @Test + public void testGetName() throws Exception { + Resource testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getName(); + } + + + @Test + public void testGetDescription() throws Exception { + Resource testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getDescription(); + } + + + @Test + public void testGetVersion() throws Exception { + Resource testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getVersion(); + } + + + @Test + public void testGetToscaModelURL() throws Exception { + Resource testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getToscaModelURL(); + } + + + @Test + public void testGetCategory() throws Exception { + Resource testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getCategory(); + } + + + @Test + public void testGetSubCategory() throws Exception { + Resource testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getSubCategory(); + } + + + @Test + public void testGetResourceType() throws Exception { + Resource testSubject; + Type result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getResourceType(); + } + + + @Test + public void testGetLifecycleState() throws Exception { + Resource testSubject; + LifecycleState result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getLifecycleState(); + } + + + @Test + public void testGetLastUpdaterUserId() throws Exception { + Resource testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getLastUpdaterUserId(); + } + + + @Test + public void testGetLastUpdaterFullName() throws Exception { + Resource testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getLastUpdaterFullName(); + } + + + @Test + public void testGetToscaModel() throws Exception { + Resource testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getToscaModel(); + } + + + @Test + public void testGetToscaResourceName() throws Exception { + Resource testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getToscaResourceName(); + } + + + @Test + public void testGetArtifacts() throws Exception { + Resource testSubject; + Collection<Artifact> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getArtifacts(); + } + + + @Test + public void testGetResources() throws Exception { + Resource testSubject; + Collection<SubResource> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getResources(); + } + + + @Test + public void testSetUuid() throws Exception { + Resource testSubject; + String uuid = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setUuid(uuid); + } + + + @Test + public void testSetInvariantUUID() throws Exception { + Resource testSubject; + String invariantUUID = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setInvariantUUID(invariantUUID); + } + + + @Test + public void testSetName() throws Exception { + Resource testSubject; + String name = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setName(name); + } + + + @Test + public void testSetDescription() throws Exception { + Resource testSubject; + String description = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setDescription(description); + } + + + @Test + public void testSetVersion() throws Exception { + Resource testSubject; + String version = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setVersion(version); + } + + + @Test + public void testSetToscaModelURL() throws Exception { + Resource testSubject; + String toscaModelURL = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setToscaModelURL(toscaModelURL); + } + + + @Test + public void testSetCategory() throws Exception { + Resource testSubject; + String category = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setCategory(category); + } + + + @Test + public void testSetSubCategory() throws Exception { + Resource testSubject; + String subCategory = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setSubCategory(subCategory); + } + + + @Test + public void testSetResourceType() throws Exception { + Resource testSubject; + Type resourceType = null; + + // default test + testSubject = createTestSubject(); + testSubject.setResourceType(resourceType); + } + + + @Test + public void testSetLifecycleState() throws Exception { + Resource testSubject; + LifecycleState lifecycleState = null; + + // default test + testSubject = createTestSubject(); + testSubject.setLifecycleState(lifecycleState); + } + + + @Test + public void testSetLastUpdaterUserId() throws Exception { + Resource testSubject; + String lastUpdaterUserId = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setLastUpdaterUserId(lastUpdaterUserId); + } + + + @Test + public void testSetLastUpdaterFullName() throws Exception { + Resource testSubject; + String lastUpdaterFullName = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setLastUpdaterFullName(lastUpdaterFullName); + } + + + @Test + public void testSetToscaModel() throws Exception { + Resource testSubject; + String toscaModel = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setToscaModel(toscaModel); + } + + + @Test + public void testSetToscaResourceName() throws Exception { + Resource testSubject; + String toscaResourceName = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setToscaResourceName(toscaResourceName); + } + + + @Test + public void testSetArtifacts() throws Exception { + Resource testSubject; + Collection<Artifact> artifacts = null; + + // default test + testSubject = createTestSubject(); + testSubject.setArtifacts(artifacts); + } + + + @Test + public void testSetResources() throws Exception { + Resource testSubject; + Collection<SubResource> resources = null; + + // default test + testSubject = createTestSubject(); + testSubject.setResources(resources); + } + + + @Test + public void testHashCode() throws Exception { + Resource testSubject; + int result; + + // default test + testSubject = createTestSubject(); + testSubject.setUuid("cb49608f-5a24-4789-b0f7-2595473cb997"); + result = testSubject.hashCode(); + } + + + @Test + public void testEquals() throws Exception { + Resource testSubject; + Object o = null; + boolean result; + + // default test + testSubject = createTestSubject(); + result = testSubject.equals(o); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/TestSuite.java new file mode 100644 index 00000000..2583c6ce --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/TestSuite.java @@ -0,0 +1,11 @@ +package org.openecomp.vid.asdc.beans; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( + +{ ResourceTest.class }) +public class TestSuite { // nothing +} diff --git a/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/CapabilityTest.java b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/CapabilityTest.java new file mode 100644 index 00000000..4eed93b5 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/CapabilityTest.java @@ -0,0 +1,124 @@ +package org.openecomp.vid.asdc.beans.tosca; + +import java.util.Collection; +import java.util.Map; + +import org.junit.Test; + + +public class CapabilityTest { + + private Capability createTestSubject() { + return new Capability(); + } + + + @Test + public void testGetType() throws Exception { + Capability testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getType(); + } + + + @Test + public void testGetDescription() throws Exception { + Capability testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getDescription(); + } + + + @Test + public void testGetOccurrences() throws Exception { + Capability testSubject; + Collection<String> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getOccurrences(); + } + + + @Test + public void testGetProperties() throws Exception { + Capability testSubject; + Map<String, Property> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getProperties(); + } + + + @Test + public void testGetValid_source_types() throws Exception { + Capability testSubject; + Collection<String> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getValid_source_types(); + } + + + @Test + public void testSetType() throws Exception { + Capability testSubject; + String type = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setType(type); + } + + + @Test + public void testSetDescription() throws Exception { + Capability testSubject; + String description = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setDescription(description); + } + + + @Test + public void testSetOccurrences() throws Exception { + Capability testSubject; + Collection<String> occurrences = null; + + // default test + testSubject = createTestSubject(); + testSubject.setOccurrences(occurrences); + } + + + @Test + public void testSetProperties() throws Exception { + Capability testSubject; + Map<String, Property> properties = null; + + // default test + testSubject = createTestSubject(); + testSubject.setProperties(properties); + } + + + @Test + public void testSetValid_source_types() throws Exception { + Capability testSubject; + Collection<String> valid_source_types = null; + + // default test + testSubject = createTestSubject(); + testSubject.setValid_source_types(valid_source_types); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/ConstraintTest.java b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/ConstraintTest.java new file mode 100644 index 00000000..fb416f7e --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/ConstraintTest.java @@ -0,0 +1,221 @@ +package org.openecomp.vid.asdc.beans.tosca; + +import java.util.List; + +import org.junit.Test; + +public class ConstraintTest { + + private Constraint createTestSubject() { + return new Constraint(); + } + + + @Test + public void testGetvalid_values() throws Exception { + Constraint testSubject; + List<Object> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getvalid_values(); + } + + + @Test + public void testGetEqual() throws Exception { + Constraint testSubject; + Object result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getEqual(); + } + + + @Test + public void testGetGreater_than() throws Exception { + Constraint testSubject; + Object result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getGreater_than(); + } + + + @Test + public void testGetGreater_or_equal() throws Exception { + Constraint testSubject; + Object result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getGreater_or_equal(); + } + + + @Test + public void testGetLess_than() throws Exception { + Constraint testSubject; + Object result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getLess_than(); + } + + + @Test + public void testGetLess_or_equal() throws Exception { + Constraint testSubject; + Object result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getLess_or_equal(); + } + + + @Test + public void testGetIn_range() throws Exception { + Constraint testSubject; + List<Object> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getIn_range(); + } + + + @Test + public void testGetLength() throws Exception { + Constraint testSubject; + Object result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getLength(); + } + + + @Test + public void testGetMin_length() throws Exception { + Constraint testSubject; + Object result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getMin_length(); + } + + + @Test + public void testGetMax_length() throws Exception { + Constraint testSubject; + Object result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getMax_length(); + } + + + @Test + public void testSetvalid_values() throws Exception { + Constraint testSubject; + List<Object> vlist = null; + + // default test + testSubject = createTestSubject(); + testSubject.setvalid_values(vlist); + } + + + @Test + public void testSetEqual() throws Exception { + Constraint testSubject; + Object e = null; + + // default test + testSubject = createTestSubject(); + testSubject.setEqual(e); + } + + + @Test + public void testSetGreater_than() throws Exception { + Constraint testSubject; + Object e = null; + + // default test + testSubject = createTestSubject(); + testSubject.setGreater_than(e); + } + + + @Test + public void testSetLess_than() throws Exception { + Constraint testSubject; + Object e = null; + + // default test + testSubject = createTestSubject(); + testSubject.setLess_than(e); + } + + + @Test + public void testSetIn_range() throws Exception { + Constraint testSubject; + List<Object> e = null; + + // default test + testSubject = createTestSubject(); + testSubject.setIn_range(e); + } + + + @Test + public void testSetLength() throws Exception { + Constraint testSubject; + Object e = null; + + // default test + testSubject = createTestSubject(); + testSubject.setLength(e); + } + + + @Test + public void testSetMin_length() throws Exception { + Constraint testSubject; + Object e = null; + + // default test + testSubject = createTestSubject(); + testSubject.setMin_length(e); + } + + + @Test + public void testSetMax_length() throws Exception { + Constraint testSubject; + Object e = null; + + // default test + testSubject = createTestSubject(); + testSubject.setMax_length(e); + } + + + @Test + public void testToString() throws Exception { + Constraint testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/GroupTest.java b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/GroupTest.java new file mode 100644 index 00000000..d3a1e4bb --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/GroupTest.java @@ -0,0 +1,124 @@ +package org.openecomp.vid.asdc.beans.tosca; + +import java.util.Collection; +import java.util.Map; + +import org.junit.Test; + + +public class GroupTest { + + private Group createTestSubject() { + return new Group(); + } + + + @Test + public void testGetMetadata() throws Exception { + Group testSubject; + ToscaMetadata result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getMetadata(); + } + + + @Test + public void testSetMetadata() throws Exception { + Group testSubject; + ToscaMetadata metadata = null; + + // default test + testSubject = createTestSubject(); + testSubject.setMetadata(metadata); + } + + + @Test + public void testGetMembers() throws Exception { + Group testSubject; + Collection<String> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getMembers(); + } + + + @Test + public void testSetMembers() throws Exception { + Group testSubject; + Collection<String> members = null; + + // default test + testSubject = createTestSubject(); + testSubject.setMembers(members); + } + + + @Test + public void testGetType() throws Exception { + Group testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getType(); + } + + + @Test + public void testSetType() throws Exception { + Group testSubject; + String type = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setType(type); + } + + + @Test + public void testGetvf_module_type() throws Exception { + Group testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getvf_module_type(); + } + + + @Test + public void testSetvf_module_type() throws Exception { + Group testSubject; + String vf_module_type = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setvf_module_type(vf_module_type); + } + + + @Test + public void testGetProperties() throws Exception { + Group testSubject; + Map<String, Object> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getProperties(); + } + + + @Test + public void testSetProperties() throws Exception { + Group testSubject; + Map<String, Object> properties = null; + + // default test + testSubject = createTestSubject(); + testSubject.setProperties(properties); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/NodeTemplateTest.java b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/NodeTemplateTest.java new file mode 100644 index 00000000..89177807 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/NodeTemplateTest.java @@ -0,0 +1,92 @@ +package org.openecomp.vid.asdc.beans.tosca; + +import java.util.Map; + +import org.junit.Test; + +public class NodeTemplateTest { + + private NodeTemplate createTestSubject() { + return new NodeTemplate(); + } + + @Test + public void testGetType() throws Exception { + NodeTemplate testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getType(); + } + + @Test + public void testSetType() throws Exception { + NodeTemplate testSubject; + String type = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setType(type); + } + + @Test + public void testGetMetadata() throws Exception { + NodeTemplate testSubject; + ToscaMetadata result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getMetadata(); + } + + @Test + public void testSetMetadata() throws Exception { + NodeTemplate testSubject; + ToscaMetadata metadata = null; + + // default test + testSubject = createTestSubject(); + testSubject.setMetadata(metadata); + } + + @Test + public void testGetProperties() throws Exception { + NodeTemplate testSubject; + Map<String, Object> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getProperties(); + } + + @Test + public void testSetProperties() throws Exception { + NodeTemplate testSubject; + Map<String, Object> properties = null; + + // default test + testSubject = createTestSubject(); + testSubject.setProperties(properties); + } + + @Test + public void testGetRequirements() throws Exception { + NodeTemplate testSubject; + Object result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getRequirements(); + } + + @Test + public void testSetRequirements() throws Exception { + NodeTemplate testSubject; + Object requirements = null; + + // default test + testSubject = createTestSubject(); + testSubject.setRequirements(requirements); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/TestSuite.java new file mode 100644 index 00000000..40e08683 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/TestSuite.java @@ -0,0 +1,12 @@ +package org.openecomp.vid.asdc.beans.tosca; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( + +{ GroupTest.class, TopologyTemplateTest.class, ToscaModelTest.class, CapabilityTest.class, ToscaMetadataTest.class, + ConstraintTest.class, NodeTemplateTest.class }) +public class TestSuite { // nothing +} diff --git a/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/TopologyTemplateTest.java b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/TopologyTemplateTest.java new file mode 100644 index 00000000..a3b96c26 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/TopologyTemplateTest.java @@ -0,0 +1,101 @@ +package org.openecomp.vid.asdc.beans.tosca; + +import java.util.Map; + +import org.junit.Test; + + +public class TopologyTemplateTest { + + private TopologyTemplate createTestSubject() { + return new TopologyTemplate(); + } + + + @Test + public void testGetsubstitution_mappings() throws Exception { + TopologyTemplate testSubject; + SubstitutionMappings result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getsubstitution_mappings(); + } + + + @Test + public void testSetsubstitution_mappings() throws Exception { + TopologyTemplate testSubject; + SubstitutionMappings substitution_mappings = null; + + // default test + testSubject = createTestSubject(); + testSubject.setsubstitution_mappings(substitution_mappings); + } + + + @Test + public void testGetInputs() throws Exception { + TopologyTemplate testSubject; + Map<String, Input> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getInputs(); + } + + + @Test + public void testSetInputs() throws Exception { + TopologyTemplate testSubject; + Map<String, Input> inputs = null; + + // default test + testSubject = createTestSubject(); + testSubject.setInputs(inputs); + } + + + @Test + public void testGetnode_templates() throws Exception { + TopologyTemplate testSubject; + Map<String, NodeTemplate> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getnode_templates(); + } + + + @Test + public void testSetnode_templates() throws Exception { + TopologyTemplate testSubject; + Map<String, NodeTemplate> node_templates = null; + + // default test + testSubject = createTestSubject(); + testSubject.setnode_templates(node_templates); + } + + + @Test + public void testGetGroups() throws Exception { + TopologyTemplate testSubject; + Map<String, Group> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getGroups(); + } + + + @Test + public void testSetGroups() throws Exception { + TopologyTemplate testSubject; + Map<String, Group> groups = null; + + // default test + testSubject = createTestSubject(); + testSubject.setGroups(groups); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/ToscaMetadataTest.java b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/ToscaMetadataTest.java new file mode 100644 index 00000000..4c6fed5c --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/ToscaMetadataTest.java @@ -0,0 +1,443 @@ +package org.openecomp.vid.asdc.beans.tosca; + +import org.junit.Test; + +public class ToscaMetadataTest { + + private ToscaMetadata createTestSubject() { + return new ToscaMetadata(); + } + + @Test + public void testGetType() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getType(); + } + + @Test + public void testGetInvariantUUID() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getInvariantUUID(); + } + + @Test + public void testGetCustomizationUUID() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getCustomizationUUID(); + } + + @Test + public void testGetUUID() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getUUID(); + } + + @Test + public void testGetVersion() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getVersion(); + } + + @Test + public void testGetName() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getName(); + } + + @Test + public void testGetDescription() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getDescription(); + } + + @Test + public void testGetCategory() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getCategory(); + } + + @Test + public void testGetSubcategory() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getSubcategory(); + } + + @Test + public void testGetResourceVendor() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getResourceVendor(); + } + + @Test + public void testGetResourceVendorRelease() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getResourceVendorRelease(); + } + + @Test + public void testGetServiceEcompNaming() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getServiceEcompNaming(); + } + + @Test + public void testGetNamingPolicy() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getNamingPolicy(); + } + + @Test + public void testIsServiceHoming() throws Exception { + ToscaMetadata testSubject; + boolean result; + + // default test + testSubject = createTestSubject(); + result = testSubject.isServiceHoming(); + } + + @Test + public void testIsEcompGeneratedNaming() throws Exception { + ToscaMetadata testSubject; + boolean result; + + // default test + testSubject = createTestSubject(); + result = testSubject.isEcompGeneratedNaming(); + } + + @Test + public void testSetType() throws Exception { + ToscaMetadata testSubject; + String type = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setType(type); + } + + @Test + public void testSetInvariantUUID() throws Exception { + ToscaMetadata testSubject; + String invariantUUID = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setInvariantUUID(invariantUUID); + } + + @Test + public void testSetNamingPolicy() throws Exception { + ToscaMetadata testSubject; + String namingPolicy = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setNamingPolicy(namingPolicy); + } + + @Test + public void testSetUUID() throws Exception { + ToscaMetadata testSubject; + String uuid = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setUUID(uuid); + } + + @Test + public void testSetCustomizationUUID() throws Exception { + ToscaMetadata testSubject; + String u = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setCustomizationUUID(u); + } + + @Test + public void testSetVersion() throws Exception { + ToscaMetadata testSubject; + String version = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setVersion(version); + } + + @Test + public void testSetName() throws Exception { + ToscaMetadata testSubject; + String name = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setName(name); + } + + @Test + public void testSetDescription() throws Exception { + ToscaMetadata testSubject; + String description = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setDescription(description); + } + + @Test + public void testSetCategory() throws Exception { + ToscaMetadata testSubject; + String category = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setCategory(category); + } + + @Test + public void testSetServiceEcompNaming() throws Exception { + ToscaMetadata testSubject; + String serviceEcompNaming = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setServiceEcompNaming(serviceEcompNaming); + } + + @Test + public void testSetServiceHoming() throws Exception { + ToscaMetadata testSubject; + boolean serviceHoming = false; + + // default test + testSubject = createTestSubject(); + testSubject.setServiceHoming(serviceHoming); + } + + @Test + public void testSetEcompGeneratedNaming() throws Exception { + ToscaMetadata testSubject; + boolean ecompGeneratedNaming = false; + + // default test + testSubject = createTestSubject(); + testSubject.setEcompGeneratedNaming(ecompGeneratedNaming); + } + + @Test + public void testGettemplate_name() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.gettemplate_name(); + } + + @Test + public void testSettemplate_name() throws Exception { + ToscaMetadata testSubject; + String template_name = ""; + + // default test + testSubject = createTestSubject(); + testSubject.settemplate_name(template_name); + } + + + @Test + public void testSetSubcategory() throws Exception { + ToscaMetadata testSubject; + String subcategory = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setSubcategory(subcategory); + } + + + @Test + public void testSetResourceVendor() throws Exception { + ToscaMetadata testSubject; + String resourceVendor = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setResourceVendor(resourceVendor); + } + + + @Test + public void testSetResourceVendorRelease() throws Exception { + ToscaMetadata testSubject; + String resourceVendorRelease = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setResourceVendorRelease(resourceVendorRelease); + } + + + @Test + public void testGetVfModuleModelName() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getVfModuleModelName(); + } + + + @Test + public void testSetVfModuleModelName() throws Exception { + ToscaMetadata testSubject; + String vfModuleModelName = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setVfModuleModelName(vfModuleModelName); + } + + + @Test + public void testGetVfModuleModelInvariantUUID() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getVfModuleModelInvariantUUID(); + } + + + @Test + public void testSetVfModuleModelInvariantUUID() throws Exception { + ToscaMetadata testSubject; + String vfModuleModelInvariantUUID = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setVfModuleModelInvariantUUID(vfModuleModelInvariantUUID); + } + + + @Test + public void testGetVfModuleModelUUID() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getVfModuleModelUUID(); + } + + + @Test + public void testSetVfModuleModelUUID() throws Exception { + ToscaMetadata testSubject; + String vfModuleModelUUID = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setVfModuleModelUUID(vfModuleModelUUID); + } + + + @Test + public void testGetVfModuleModelVersion() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getVfModuleModelVersion(); + } + + + @Test + public void testSetVfModuleModelVersion() throws Exception { + ToscaMetadata testSubject; + String vfModuleModelVersion = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setVfModuleModelVersion(vfModuleModelVersion); + } + + + @Test + public void testSetVfModuleModelCustomizationUUID() throws Exception { + ToscaMetadata testSubject; + String u = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setVfModuleModelCustomizationUUID(u); + } + + + @Test + public void testGetVfModuleModelCustomizationUUID() throws Exception { + ToscaMetadata testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getVfModuleModelCustomizationUUID(); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/ToscaModelTest.java b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/ToscaModelTest.java new file mode 100644 index 00000000..6fb6f893 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/asdc/beans/tosca/ToscaModelTest.java @@ -0,0 +1,146 @@ +package org.openecomp.vid.asdc.beans.tosca; + +import java.util.Collection; +import java.util.Map; + +import org.junit.Test; + + +public class ToscaModelTest { + + private ToscaModel createTestSubject() { + return new ToscaModel(); + } + + + @Test + public void testGetMetadata() throws Exception { + ToscaModel testSubject; + ToscaMetadata result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getMetadata(); + } + + + @Test + public void testSetMetadata() throws Exception { + ToscaModel testSubject; + ToscaMetadata metadata = null; + + // default test + testSubject = createTestSubject(); + testSubject.setMetadata(metadata); + } + + + @Test + public void testGettosca_definitions_version() throws Exception { + ToscaModel testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.gettosca_definitions_version(); + } + + + @Test + public void testSettosca_definitions_version() throws Exception { + ToscaModel testSubject; + String tosca_definitions_version = ""; + + // default test + testSubject = createTestSubject(); + testSubject.settosca_definitions_version(tosca_definitions_version); + } + + + @Test + public void testGettopology_template() throws Exception { + ToscaModel testSubject; + TopologyTemplate result; + + // default test + testSubject = createTestSubject(); + result = testSubject.gettopology_template(); + } + + + @Test + public void testSettopology_template() throws Exception { + ToscaModel testSubject; + TopologyTemplate topology_template = null; + + // default test + testSubject = createTestSubject(); + testSubject.settopology_template(topology_template); + } + + + @Test + public void testGetDescription() throws Exception { + ToscaModel testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getDescription(); + } + + + @Test + public void testSetDescription() throws Exception { + ToscaModel testSubject; + String description = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setDescription(description); + } + + + @Test + public void testGetImports() throws Exception { + ToscaModel testSubject; + Collection<Map<String, Map<String, String>>> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getImports(); + } + + + @Test + public void testSetImports() throws Exception { + ToscaModel testSubject; + Collection<Map<String, Map<String, String>>> imports = null; + + // default test + testSubject = createTestSubject(); + testSubject.setImports(imports); + } + + + @Test + public void testGetnode_types() throws Exception { + ToscaModel testSubject; + Map<String, Object> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getnode_types(); + } + + + @Test + public void testSetnode_types() throws Exception { + ToscaModel testSubject; + Map<String, Object> node_types = null; + + // default test + testSubject = createTestSubject(); + testSubject.setnode_types(node_types); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/client/FakeHttpSessionTest.java b/vid-app-common/src/test/java/org/openecomp/vid/client/FakeHttpSessionTest.java new file mode 100644 index 00000000..f2855857 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/client/FakeHttpSessionTest.java @@ -0,0 +1,206 @@ +package org.openecomp.vid.client; + +import java.util.Enumeration; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpSessionContext; + +import org.junit.Test; + + +public class FakeHttpSessionTest { + + private FakeHttpSession createTestSubject() { + return new FakeHttpSession(); + } + + + @Test + public void testGetCreationTime() throws Exception { + FakeHttpSession testSubject; + long result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getCreationTime(); + } + + + @Test + public void testGetId() throws Exception { + FakeHttpSession testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getId(); + } + + + @Test + public void testGetLastAccessedTime() throws Exception { + FakeHttpSession testSubject; + long result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getLastAccessedTime(); + } + + + @Test + public void testGetServletContext() throws Exception { + FakeHttpSession testSubject; + ServletContext result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getServletContext(); + } + + + @Test + public void testSetMaxInactiveInterval() throws Exception { + FakeHttpSession testSubject; + int maxInactiveInterval = 0; + + // default test + testSubject = createTestSubject(); + testSubject.setMaxInactiveInterval(maxInactiveInterval); + } + + + @Test + public void testGetMaxInactiveInterval() throws Exception { + FakeHttpSession testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getMaxInactiveInterval(); + } + + + @Test + public void testGetSessionContext() throws Exception { + FakeHttpSession testSubject; + HttpSessionContext result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getSessionContext(); + } + + + @Test + public void testGetAttribute() throws Exception { + FakeHttpSession testSubject; + String name = ""; + Object result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getAttribute(name); + } + + + @Test + public void testGetValue() throws Exception { + FakeHttpSession testSubject; + String name = ""; + Object result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getValue(name); + } + + + @Test + public void testGetAttributeNames() throws Exception { + FakeHttpSession testSubject; + Enumeration<String> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getAttributeNames(); + } + + + @Test + public void testGetValueNames() throws Exception { + FakeHttpSession testSubject; + String[] result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getValueNames(); + } + + + @Test + public void testSetAttribute() throws Exception { + FakeHttpSession testSubject; + String name = ""; + Object value = null; + + // default test + testSubject = createTestSubject(); + testSubject.setAttribute(name, value); + } + + + @Test + public void testPutValue() throws Exception { + FakeHttpSession testSubject; + String name = ""; + Object value = null; + + // default test + testSubject = createTestSubject(); + testSubject.putValue(name, value); + } + + + @Test + public void testRemoveAttribute() throws Exception { + FakeHttpSession testSubject; + String name = ""; + + // default test + testSubject = createTestSubject(); + testSubject.removeAttribute(name); + } + + + @Test + public void testRemoveValue() throws Exception { + FakeHttpSession testSubject; + String name = ""; + + // default test + testSubject = createTestSubject(); + testSubject.removeValue(name); + } + + + @Test + public void testInvalidate() throws Exception { + FakeHttpSession testSubject; + + // default test + testSubject = createTestSubject(); + testSubject.invalidate(); + } + + + @Test + public void testIsNew() throws Exception { + FakeHttpSession testSubject; + boolean result; + + // default test + testSubject = createTestSubject(); + result = testSubject.isNew(); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/client/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/client/TestSuite.java new file mode 100644 index 00000000..dbbd5691 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/client/TestSuite.java @@ -0,0 +1,11 @@ +package org.openecomp.vid.client; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( + +{ FakeHttpSessionTest.class }) +public class TestSuite { // nothing +} diff --git a/vid-app-common/src/test/java/org/openecomp/vid/controller/AaiControllerTest.java b/vid-app-common/src/test/java/org/openecomp/vid/controller/AaiControllerTest.java index 2ab1052b..e342940f 100644 --- a/vid-app-common/src/test/java/org/openecomp/vid/controller/AaiControllerTest.java +++ b/vid-app-common/src/test/java/org/openecomp/vid/controller/AaiControllerTest.java @@ -3,10 +3,7 @@ package org.openecomp.vid.controller; import javax.servlet.http.HttpServletRequest; import org.json.simple.JSONObject; -import org.junit.Assert; import org.junit.Test; -import org.openecomp.vid.aai.AaiResponse; -import org.openecomp.vid.model.VersionByInvariantIdsRequest; import org.springframework.http.ResponseEntity; import org.springframework.web.servlet.ModelAndView; @@ -65,7 +62,6 @@ public class AaiControllerTest { testSubject.setViewName(viewName); } - @Test public void testGetTargetProvStatus() throws Exception { AaiController testSubject; @@ -76,8 +72,6 @@ public class AaiControllerTest { result = testSubject.getTargetProvStatus(); } - - @Test public void testViewEditGetTenantsFromServiceType() throws Exception { AaiController testSubject; @@ -91,5 +85,4 @@ public class AaiControllerTest { result = testSubject.viewEditGetTenantsFromServiceType(request, globalCustomerId, serviceType); } - }
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/controller/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/controller/TestSuite.java index 3253712e..c1b14642 100644 --- a/vid-app-common/src/test/java/org/openecomp/vid/controller/TestSuite.java +++ b/vid-app-common/src/test/java/org/openecomp/vid/controller/TestSuite.java @@ -6,6 +6,7 @@ import org.junit.runners.Suite; @RunWith(Suite.class) @Suite.SuiteClasses( -{ HealthCheckControllerTest.class, PropertyControllerTest.class, AaiControllerTest.class }) +{ HealthCheckControllerTest.class, PropertyControllerTest.class, AaiControllerTest.class, + ViewEditSubControllerTest.class }) public class TestSuite { // nothing } diff --git a/vid-app-common/src/test/java/org/openecomp/vid/controller/ViewEditSubControllerTest.java b/vid-app-common/src/test/java/org/openecomp/vid/controller/ViewEditSubControllerTest.java new file mode 100644 index 00000000..2b234ee8 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/controller/ViewEditSubControllerTest.java @@ -0,0 +1,45 @@ +package org.openecomp.vid.controller; + +import javax.servlet.http.HttpServletRequest; + +import org.junit.Test; +import org.springframework.web.servlet.ModelAndView; + +public class ViewEditSubControllerTest { + + private ViewEditSubController createTestSubject() { + return new ViewEditSubController(); + } + + @Test + public void testWelcome() throws Exception { + ViewEditSubController testSubject; + HttpServletRequest request = null; + ModelAndView result; + + // default test + testSubject = createTestSubject(); + result = testSubject.welcome(request); + } + + + @Test + public void testGetViewName() throws Exception { + ViewEditSubController testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getViewName(); + } + + @Test + public void testSetViewName() throws Exception { + ViewEditSubController testSubject; + String viewName = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setViewName(viewName); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/model/ModelUtilTest.java b/vid-app-common/src/test/java/org/openecomp/vid/model/ModelUtilTest.java new file mode 100644 index 00000000..8a9f4de8 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/model/ModelUtilTest.java @@ -0,0 +1,48 @@ +package org.openecomp.vid.model; + +import org.junit.Assert; +import org.junit.Test; + + +public class ModelUtilTest { + + private ModelUtil createTestSubject() { + return new ModelUtil(); + } + + + @Test + public void testGetTags() throws Exception { + String[] namespaces; + String constantValue = "test"; + String[] result; + + // test 1 + namespaces = null; + result = ModelUtil.getTags(namespaces, constantValue); + Assert.assertNull(result); + + // test 2 + namespaces = new String[] { "" }; + result = ModelUtil.getTags(namespaces, constantValue); + Assert.assertArrayEquals(new String[] { constantValue }, result); + } + + + @Test + public void testIsType() throws Exception { + String type = "a"; + String[] tags; + boolean result; + + // test 1 + tags = null; + result = ModelUtil.isType(type, tags); + Assert.assertEquals(false, result); + + // test 2 + tags = new String[] { "a" }; + result = ModelUtil.isType(type, tags); + Assert.assertEquals(true, result); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/model/NewNodeTest.java b/vid-app-common/src/test/java/org/openecomp/vid/model/NewNodeTest.java new file mode 100644 index 00000000..fb75c749 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/model/NewNodeTest.java @@ -0,0 +1,212 @@ +package org.openecomp.vid.model; + +import java.util.Map; + +import org.junit.Test; +import org.openecomp.vid.asdc.beans.tosca.Input; + + +public class NewNodeTest { + + private NewNode createTestSubject() { + return new NewNode(); + } + + + @Test + public void testGetUuid() throws Exception { + NewNode testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getUuid(); + } + + + @Test + public void testGetInvariantUuid() throws Exception { + NewNode testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getInvariantUuid(); + } + + + @Test + public void testGetDescription() throws Exception { + NewNode testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getDescription(); + } + + + @Test + public void testGetName() throws Exception { + NewNode testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getName(); + } + + + @Test + public void testGetVersion() throws Exception { + NewNode testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getVersion(); + } + + + @Test + public void testGetCustomizationUuid() throws Exception { + NewNode testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getCustomizationUuid(); + } + + + @Test + public void testGetInputs() throws Exception { + NewNode testSubject; + Map<String, Input> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getInputs(); + } + + + @Test + public void testGetCommands() throws Exception { + NewNode testSubject; + Map<String, CommandProperty> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getCommands(); + } + + + @Test + public void testGetProperties() throws Exception { + NewNode testSubject; + Map<String, String> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getProperties(); + } + + + @Test + public void testSetUuid() throws Exception { + NewNode testSubject; + String uuid = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setUuid(uuid); + } + + + @Test + public void testSetInvariantUuid() throws Exception { + NewNode testSubject; + String invariantUuid = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setInvariantUuid(invariantUuid); + } + + + @Test + public void testSetDescription() throws Exception { + NewNode testSubject; + String description = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setDescription(description); + } + + + @Test + public void testSetName() throws Exception { + NewNode testSubject; + String name = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setName(name); + } + + + @Test + public void testSetVersion() throws Exception { + NewNode testSubject; + String version = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setVersion(version); + } + + + @Test + public void testSetCustomizationUuid() throws Exception { + NewNode testSubject; + String u = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setCustomizationUuid(u); + } + + + @Test + public void testSetInputs() throws Exception { + NewNode testSubject; + Map<String, Input> inputs = null; + + // default test + testSubject = createTestSubject(); + testSubject.setInputs(inputs); + } + + + @Test + public void testSetCommands() throws Exception { + NewNode testSubject; + Map<String, CommandProperty> m = null; + + // default test + testSubject = createTestSubject(); + testSubject.setCommands(m); + } + + + @Test + public void testSetProperties() throws Exception { + NewNode testSubject; + Map<String, String> p = null; + + // default test + testSubject = createTestSubject(); + testSubject.setProperties(p); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/model/NewServiceTest.java b/vid-app-common/src/test/java/org/openecomp/vid/model/NewServiceTest.java new file mode 100644 index 00000000..f7891427 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/model/NewServiceTest.java @@ -0,0 +1,235 @@ +package org.openecomp.vid.model; + +import java.util.Map; + +import org.junit.Test; +import org.openecomp.vid.asdc.beans.tosca.Input; + +public class NewServiceTest { + + private NewService createTestSubject() { + return new NewService(); + } + + + @Test + public void testGetUuid() throws Exception { + NewService testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getUuid(); + } + + + @Test + public void testGetInvariantUuid() throws Exception { + NewService testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getInvariantUuid(); + } + + + @Test + public void testGetName() throws Exception { + NewService testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getName(); + } + + + @Test + public void testGetVersion() throws Exception { + NewService testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getVersion(); + } + + + @Test + public void testGetToscaModelURL() throws Exception { + NewService testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getToscaModelURL(); + } + + + @Test + public void testGetCategory() throws Exception { + NewService testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getCategory(); + } + + + @Test + public void testGetDescription() throws Exception { + NewService testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getDescription(); + } + + + @Test + public void testGetInputs() throws Exception { + NewService testSubject; + Map<String, Input> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getInputs(); + } + + + @Test + public void testGetServiceEcompNaming() throws Exception { + NewService testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getServiceEcompNaming(); + } + + + @Test + public void testSetUuid() throws Exception { + NewService testSubject; + String uuid = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setUuid(uuid); + } + + + @Test + public void testSetInvariantUuid() throws Exception { + NewService testSubject; + String invariantUuid = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setInvariantUuid(invariantUuid); + } + + + @Test + public void testSetName() throws Exception { + NewService testSubject; + String name = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setName(name); + } + + + @Test + public void testSetVersion() throws Exception { + NewService testSubject; + String version = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setVersion(version); + } + + + @Test + public void testSetToscaModelURL() throws Exception { + NewService testSubject; + String toscaModelURL = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setToscaModelURL(toscaModelURL); + } + + + @Test + public void testSetCategory() throws Exception { + NewService testSubject; + String category = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setCategory(category); + } + + + @Test + public void testSetDescription() throws Exception { + NewService testSubject; + String description = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setDescription(description); + } + + + @Test + public void testSetInputs() throws Exception { + NewService testSubject; + Map<String, Input> inputs = null; + + // default test + testSubject = createTestSubject(); + testSubject.setInputs(inputs); + } + + + @Test + public void testSetServiceEcompNaming() throws Exception { + NewService testSubject; + String serviceEcompNaming = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setServiceEcompNaming(serviceEcompNaming); + } + + + @Test + public void testHashCode() throws Exception { + NewService testSubject; + int result; + + // default test + testSubject = createTestSubject(); + testSubject.setUuid("cb49608f-5a24-4789-b0f7-2595473cb997"); + result = testSubject.hashCode(); + } + + + @Test + public void testEquals() throws Exception { + NewService testSubject; + Object o = null; + boolean result; + + // default test + testSubject = createTestSubject(); + result = testSubject.equals(o); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/model/NewVNFTest.java b/vid-app-common/src/test/java/org/openecomp/vid/model/NewVNFTest.java new file mode 100644 index 00000000..5f4f90b9 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/model/NewVNFTest.java @@ -0,0 +1,88 @@ +package org.openecomp.vid.model; + +import java.util.Map; + +import org.junit.Test; + +public class NewVNFTest { + + private NewVNF createTestSubject() { + return new NewVNF(); + } + + + @Test + public void testGetModelCustomizationName() throws Exception { + NewVNF testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getModelCustomizationName(); + } + + + @Test + public void testGetVfModules() throws Exception { + NewVNF testSubject; + Map<String, VfModule> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getVfModules(); + } + + + @Test + public void testSetVfModules() throws Exception { + NewVNF testSubject; + Map<String, VfModule> vfModules = null; + + // default test + testSubject = createTestSubject(); + testSubject.setVfModules(vfModules); + } + + + @Test + public void testGetVolumeGroups() throws Exception { + NewVNF testSubject; + Map<String, VolumeGroup> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getVolumeGroups(); + } + + + @Test + public void testSetVolumeGroups() throws Exception { + NewVNF testSubject; + Map<String, VolumeGroup> volumeGroups = null; + + // default test + testSubject = createTestSubject(); + testSubject.setVolumeGroups(volumeGroups); + } + + + @Test + public void testSetModelCustomizationName() throws Exception { + NewVNF testSubject; + String modelCustomizationName = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setModelCustomizationName(modelCustomizationName); + } + + + @Test + public void testNormalizeName() throws Exception { + String originalName = ""; + String result; + + // default test + result = NewVNF.normalizeName(originalName); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/model/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/model/TestSuite.java index a58bbba0..3d7f57b3 100644 --- a/vid-app-common/src/test/java/org/openecomp/vid/model/TestSuite.java +++ b/vid-app-common/src/test/java/org/openecomp/vid/model/TestSuite.java @@ -6,6 +6,7 @@ import org.junit.runners.Suite; @RunWith(Suite.class) @Suite.SuiteClasses( -{ ServiceModelTest.class }) +{ ModelUtilTest.class, NewServiceTest.class, VolumeGroupTest.class, NewNodeTest.class, ServiceModelTest.class, + WorkflowTest.class, NewVNFTest.class }) public class TestSuite { // nothing } diff --git a/vid-app-common/src/test/java/org/openecomp/vid/model/VolumeGroupTest.java b/vid-app-common/src/test/java/org/openecomp/vid/model/VolumeGroupTest.java new file mode 100644 index 00000000..038290b2 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/model/VolumeGroupTest.java @@ -0,0 +1,169 @@ +package org.openecomp.vid.model; + +import org.junit.Test; +import org.openecomp.vid.asdc.beans.tosca.Group; + + +public class VolumeGroupTest { + + private VolumeGroup createTestSubject() { + return new VolumeGroup(); + } + + + @Test + public void testGetUuid() throws Exception { + VolumeGroup testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getUuid(); + } + + + @Test + public void testGetCustomizationUuid() throws Exception { + VolumeGroup testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getCustomizationUuid(); + } + + + @Test + public void testGetModelCustomizationName() throws Exception { + VolumeGroup testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getModelCustomizationName(); + } + + + @Test + public void testGetInvariantUuid() throws Exception { + VolumeGroup testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getInvariantUuid(); + } + + + @Test + public void testGetDescription() throws Exception { + VolumeGroup testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getDescription(); + } + + + @Test + public void testGetName() throws Exception { + VolumeGroup testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getName(); + } + + + @Test + public void testGetVersion() throws Exception { + VolumeGroup testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getVersion(); + } + + + @Test + public void testSetUuid() throws Exception { + VolumeGroup testSubject; + String uuid = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setUuid(uuid); + } + + + @Test + public void testSetInvariantUuid() throws Exception { + VolumeGroup testSubject; + String invariantUuid = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setInvariantUuid(invariantUuid); + } + + + @Test + public void testSetDescription() throws Exception { + VolumeGroup testSubject; + String description = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setDescription(description); + } + + + @Test + public void testSetName() throws Exception { + VolumeGroup testSubject; + String name = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setName(name); + } + + + @Test + public void testSetVersion() throws Exception { + VolumeGroup testSubject; + String version = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setVersion(version); + } + + + @Test + public void testSetCustomizationUuid() throws Exception { + VolumeGroup testSubject; + String u = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setCustomizationUuid(u); + } + + + @Test + public void testSetModelCustomizationName() throws Exception { + VolumeGroup testSubject; + String u = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setModelCustomizationName(u); + } + + + +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/model/WorkflowTest.java b/vid-app-common/src/test/java/org/openecomp/vid/model/WorkflowTest.java new file mode 100644 index 00000000..5f8ec7d1 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/model/WorkflowTest.java @@ -0,0 +1,72 @@ +package org.openecomp.vid.model; + +import java.util.Collection; + +import org.junit.Test; + +public class WorkflowTest { + + private Workflow createTestSubject() { + return new Workflow(); + } + + @Test + public void testGetId() throws Exception { + Workflow testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getId(); + } + + @Test + public void testGetWorkflowName() throws Exception { + Workflow testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getWorkflowName(); + } + + @Test + public void testGetVnfNames() throws Exception { + Workflow testSubject; + Collection<String> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getVnfNames(); + } + + @Test + public void testSetId() throws Exception { + Workflow testSubject; + int id = 0; + + // default test + testSubject = createTestSubject(); + testSubject.setId(id); + } + + @Test + public void testSetWorkflowName() throws Exception { + Workflow testSubject; + String workflowName = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setWorkflowName(workflowName); + } + + @Test + public void testSetVnfName() throws Exception { + Workflow testSubject; + Collection<String> vnfNames = null; + + // default test + testSubject = createTestSubject(); + testSubject.setVnfName(vnfNames); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoLocalClientNewTest.java b/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoLocalClientNewTest.java new file mode 100644 index 00000000..6e409737 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoLocalClientNewTest.java @@ -0,0 +1,169 @@ +package org.openecomp.vid.mso; + +import org.junit.Test; +import org.openecomp.vid.changeManagement.RequestDetails; + +public class MsoLocalClientNewTest { + + private MsoLocalClientNew createTestSubject() { + return new MsoLocalClientNew(); + } + + @Test + public void testCreateSvcInstance() throws Exception { + MsoLocalClientNew testSubject; + RequestDetails requestDetails = null; + String endpoint = ""; + MsoResponseWrapper result; + + // default test + testSubject = createTestSubject(); + result = testSubject.createSvcInstance(requestDetails, endpoint); + } + + @Test + public void testCreateInstance() throws Exception { + MsoLocalClientNew testSubject; + RequestDetails request = null; + String path = ""; + MsoResponseWrapper result; + + // default test + testSubject = createTestSubject(); + result = testSubject.createInstance(request, path); + } + + @Test + public void testCreateVnf() throws Exception { + MsoLocalClientNew testSubject; + RequestDetails requestDetails = null; + String endpoint = ""; + MsoResponseWrapper result; + + // default test + testSubject = createTestSubject(); + result = testSubject.createVnf(requestDetails, endpoint); + } + + @Test + public void testCreateNwInstance() throws Exception { + MsoLocalClientNew testSubject; + RequestDetails requestDetails = null; + String endpoint = ""; + MsoResponseWrapper result; + + // default test + testSubject = createTestSubject(); + result = testSubject.createNwInstance(requestDetails, endpoint); + } + + @Test + public void testCreateVolumeGroupInstance() throws Exception { + MsoLocalClientNew testSubject; + RequestDetails requestDetails = null; + String path = ""; + MsoResponseWrapper result; + + // default test + testSubject = createTestSubject(); + result = testSubject.createVolumeGroupInstance(requestDetails, path); + } + + @Test + public void testCreateVfModuleInstance() throws Exception { + MsoLocalClientNew testSubject; + RequestDetails requestDetails = null; + String endpoint = ""; + MsoResponseWrapper result; + + // default test + testSubject = createTestSubject(); + result = testSubject.createVfModuleInstance(requestDetails, endpoint); + } + + @Test + public void testDeleteSvcInstance() throws Exception { + MsoLocalClientNew testSubject; + RequestDetails requestDetails = null; + String endpoint = ""; + MsoResponseWrapper result; + + // default test + testSubject = createTestSubject(); + result = testSubject.deleteSvcInstance(requestDetails, endpoint); + } + + @Test + public void testDeleteVnf() throws Exception { + MsoLocalClientNew testSubject; + RequestDetails requestDetails = null; + String endpoint = ""; + MsoResponseWrapper result; + + // default test + testSubject = createTestSubject(); + result = testSubject.deleteVnf(requestDetails, endpoint); + } + + @Test + public void testDeleteVfModule() throws Exception { + MsoLocalClientNew testSubject; + RequestDetails requestDetails = null; + String endpoint = ""; + MsoResponseWrapper result; + + // default test + testSubject = createTestSubject(); + result = testSubject.deleteVfModule(requestDetails, endpoint); + } + + @Test + public void testDeleteVolumeGroupInstance() throws Exception { + MsoLocalClientNew testSubject; + RequestDetails requestDetails = null; + String endpoint = ""; + MsoResponseWrapper result; + + // default test + testSubject = createTestSubject(); + result = testSubject.deleteVolumeGroupInstance(requestDetails, endpoint); + } + + @Test + public void testDeleteNwInstance() throws Exception { + MsoLocalClientNew testSubject; + RequestDetails requestDetails = null; + String endpoint = ""; + MsoResponseWrapper result; + + // default test + testSubject = createTestSubject(); + result = testSubject.deleteNwInstance(requestDetails, endpoint); + } + + @Test + public void testGetOrchestrationRequest() throws Exception { + MsoLocalClientNew testSubject; + String t = ""; + String sourceId = ""; + String endpoint = ""; + RestObject restObject = null; + + // default test + testSubject = createTestSubject(); + testSubject.getOrchestrationRequest(t, sourceId, endpoint, restObject); + } + + + @Test + public void testUpdateVnf() throws Exception { + MsoLocalClientNew testSubject; + RequestDetails requestDetails = null; + String vnf_endpoint = ""; + MsoResponseWrapper result; + + // default test + testSubject = createTestSubject(); + result = testSubject.updateVnf(requestDetails, vnf_endpoint); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoRestIntTest.java b/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoRestIntTest.java new file mode 100644 index 00000000..e32e4872 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoRestIntTest.java @@ -0,0 +1,22 @@ +package org.openecomp.vid.mso; + +import org.junit.Test; +import org.openecomp.vid.mso.rest.RequestDetails; + +public class MsoRestIntTest { + + private MsoRestInt createTestSubject() { + return new MsoRestInt(); + } + + @Test + public void testLogRequest() throws Exception { + MsoRestInt testSubject; + RequestDetails r = null; + + // test 1 + testSubject = createTestSubject(); + r = null; + testSubject.logRequest(r); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoRestInterfaceTest.java b/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoRestInterfaceTest.java new file mode 100644 index 00000000..9c96e117 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoRestInterfaceTest.java @@ -0,0 +1,21 @@ +package org.openecomp.vid.mso; + +import org.apache.poi.hssf.record.formula.functions.T; +import org.junit.Test; + +public class MsoRestInterfaceTest { + + private MsoRestInterface createTestSubject() { + return new MsoRestInterface(); + } + + @Test + public void testInitMsoClient() throws Exception { + MsoRestInterface testSubject; + + // default test + testSubject = createTestSubject(); + testSubject.initMsoClient(); + } + +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoUtilTest.java b/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoUtilTest.java new file mode 100644 index 00000000..6a9816e3 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/mso/MsoUtilTest.java @@ -0,0 +1,53 @@ +package org.openecomp.vid.mso; + +import org.apache.poi.hssf.record.formula.functions.T; +import org.glassfish.jersey.client.ClientResponse; +import org.junit.Assert; +import org.junit.Test; + +public class MsoUtilTest { + + private MsoUtil createTestSubject() { + return new MsoUtil(); + } + + @Test + public void testWrapResponse() throws Exception { + String body = ""; + int statusCode = 0; + MsoResponseWrapper result; + + // default test + result = MsoUtil.wrapResponse(body, statusCode); + } + + + @Test + public void testWrapResponse_2() throws Exception { + RestObject<String> rs = null; + MsoResponseWrapper result; + + // test 1 + result = MsoUtil.wrapResponse(rs); + Assert.assertNotNull(result); + } + + @Test + public void testConvertPojoToString() throws Exception { + T t = null; + String result; + + // test 1 + t = null; + result = MsoUtil.convertPojoToString(t); + Assert.assertEquals("", result); + } + + @Test + public void testMain() throws Exception { + String[] args = new String[] { "" }; + + // default test + MsoUtil.main(args); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/mso/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/mso/TestSuite.java index e2347b53..aa30935c 100644 --- a/vid-app-common/src/test/java/org/openecomp/vid/mso/TestSuite.java +++ b/vid-app-common/src/test/java/org/openecomp/vid/mso/TestSuite.java @@ -6,6 +6,7 @@ import org.junit.runners.Suite; @RunWith(Suite.class) @Suite.SuiteClasses( -{ RestMsoImplementationTest.class }) +{ MsoRestIntTest.class, MsoUtilTest.class, MsoRestInterfaceTest.class, MsoLocalClientNewTest.class, + RestMsoImplementationTest.class, org.openecomp.vid.mso.rest.TestSuite.class }) public class TestSuite { // nothing } diff --git a/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/AsyncRequestStatusTest.java b/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/AsyncRequestStatusTest.java new file mode 100644 index 00000000..663d1f53 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/AsyncRequestStatusTest.java @@ -0,0 +1,91 @@ +package org.openecomp.vid.mso.rest; + +import org.junit.Test; +import org.openecomp.vid.domain.mso.InstanceIds; +import org.openecomp.vid.domain.mso.RequestStatus; + + +public class AsyncRequestStatusTest { + + private AsyncRequestStatus createTestSubject() { + return new AsyncRequestStatus(); + } + + + @Test + public void testGetInstanceIds() throws Exception { + AsyncRequestStatus testSubject; + InstanceIds result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getInstanceIds(); + } + + + @Test + public void testSetInstanceIds() throws Exception { + AsyncRequestStatus testSubject; + InstanceIds instanceIds = null; + + // default test + testSubject = createTestSubject(); + testSubject.setInstanceIds(instanceIds); + } + + + @Test + public void testGetRequestStatus() throws Exception { + AsyncRequestStatus testSubject; + RequestStatus result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getRequestStatus(); + } + + + @Test + public void testSetRequestStatus() throws Exception { + AsyncRequestStatus testSubject; + RequestStatus requestStatus = null; + + // default test + testSubject = createTestSubject(); + testSubject.setRequestStatus(requestStatus); + } + + + @Test + public void testToString() throws Exception { + AsyncRequestStatus testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } + + + @Test + public void testHashCode() throws Exception { + AsyncRequestStatus testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.hashCode(); + } + + + @Test + public void testEquals() throws Exception { + AsyncRequestStatus testSubject; + Object other = null; + boolean result; + + // default test + testSubject = createTestSubject(); + result = testSubject.equals(other); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/RelatedInstanceTest.java b/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/RelatedInstanceTest.java new file mode 100644 index 00000000..b3bee441 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/RelatedInstanceTest.java @@ -0,0 +1,93 @@ +package org.openecomp.vid.mso.rest; + +import java.util.Map; + +import org.junit.Test; +import org.openecomp.vid.domain.mso.ModelInfo; + + +public class RelatedInstanceTest { + + private RelatedInstance createTestSubject() { + return new RelatedInstance(); + } + + + @Test + public void testGetModelInfo() throws Exception { + RelatedInstance testSubject; + ModelInfo result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getModelInfo(); + } + + + @Test + public void testSetModelInfo() throws Exception { + RelatedInstance testSubject; + ModelInfo modelInfo = null; + + // default test + testSubject = createTestSubject(); + testSubject.setModelInfo(modelInfo); + } + + + @Test + public void testToString() throws Exception { + RelatedInstance testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } + + + @Test + public void testGetAdditionalProperties() throws Exception { + RelatedInstance testSubject; + Map<String, Object> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getAdditionalProperties(); + } + + + @Test + public void testSetAdditionalProperty() throws Exception { + RelatedInstance testSubject; + String name = ""; + Object value = null; + + // default test + testSubject = createTestSubject(); + testSubject.setAdditionalProperty(name, value); + } + + + @Test + public void testHashCode() throws Exception { + RelatedInstance testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.hashCode(); + } + + + @Test + public void testEquals() throws Exception { + RelatedInstance testSubject; + Object other = null; + boolean result; + + // default test + testSubject = createTestSubject(); + result = testSubject.equals(other); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/RelatedModelTest.java b/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/RelatedModelTest.java new file mode 100644 index 00000000..b08ff89b --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/RelatedModelTest.java @@ -0,0 +1,93 @@ +package org.openecomp.vid.mso.rest; + +import java.util.Map; + +import org.junit.Test; +import org.openecomp.vid.domain.mso.ModelInfo; + + +public class RelatedModelTest { + + private RelatedModel createTestSubject() { + return new RelatedModel(); + } + + + @Test + public void testGetModelInfo() throws Exception { + RelatedModel testSubject; + ModelInfo result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getModelInfo(); + } + + + @Test + public void testSetModelInfo() throws Exception { + RelatedModel testSubject; + ModelInfo modelInfo = null; + + // default test + testSubject = createTestSubject(); + testSubject.setModelInfo(modelInfo); + } + + + @Test + public void testToString() throws Exception { + RelatedModel testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } + + + @Test + public void testGetAdditionalProperties() throws Exception { + RelatedModel testSubject; + Map<String, Object> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getAdditionalProperties(); + } + + + @Test + public void testSetAdditionalProperty() throws Exception { + RelatedModel testSubject; + String name = ""; + Object value = null; + + // default test + testSubject = createTestSubject(); + testSubject.setAdditionalProperty(name, value); + } + + + @Test + public void testHashCode() throws Exception { + RelatedModel testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.hashCode(); + } + + + @Test + public void testEquals() throws Exception { + RelatedModel testSubject; + Object other = null; + boolean result; + + // default test + testSubject = createTestSubject(); + result = testSubject.equals(other); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/RequestDetailsTest.java b/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/RequestDetailsTest.java new file mode 100644 index 00000000..41fbc7a1 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/RequestDetailsTest.java @@ -0,0 +1,182 @@ +package org.openecomp.vid.mso.rest; + +import java.util.List; +import java.util.Map; + +import org.junit.Test; +import org.openecomp.vid.domain.mso.*; + + +public class RequestDetailsTest { + + private RequestDetails createTestSubject() { + return new RequestDetails(); + } + + + @Test + public void testGetCloudConfiguration() throws Exception { + RequestDetails testSubject; + CloudConfiguration result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getCloudConfiguration(); + } + + + @Test + public void testSetCloudConfiguration() throws Exception { + RequestDetails testSubject; + CloudConfiguration cloudConfiguration = null; + + // default test + testSubject = createTestSubject(); + testSubject.setCloudConfiguration(cloudConfiguration); + } + + + @Test + public void testGetModelInfo() throws Exception { + RequestDetails testSubject; + ModelInfo result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getModelInfo(); + } + + + @Test + public void testSetModelInfo() throws Exception { + RequestDetails testSubject; + ModelInfo modelInfo = null; + + // default test + testSubject = createTestSubject(); + testSubject.setModelInfo(modelInfo); + } + + + @Test + public void testGetRelatedInstanceList() throws Exception { + RequestDetails testSubject; + List<RelatedModel> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getRelatedInstanceList(); + } + + + @Test + public void testSetRelatedInstanceList() throws Exception { + RequestDetails testSubject; + List<RelatedModel> relatedInstanceList = null; + + // default test + testSubject = createTestSubject(); + testSubject.setRelatedInstanceList(relatedInstanceList); + } + + + @Test + public void testGetRequestInfo() throws Exception { + RequestDetails testSubject; + RequestInfo result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getRequestInfo(); + } + + + @Test + public void testSetRequestInfo() throws Exception { + RequestDetails testSubject; + RequestInfo requestInfo = null; + + // default test + testSubject = createTestSubject(); + testSubject.setRequestInfo(requestInfo); + } + + + @Test + public void testGetSubscriberInfo() throws Exception { + RequestDetails testSubject; + SubscriberInfo result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getSubscriberInfo(); + } + + + @Test + public void testSetSubscriberInfo() throws Exception { + RequestDetails testSubject; + SubscriberInfo subscriberInfo = null; + + // default test + testSubject = createTestSubject(); + testSubject.setSubscriberInfo(subscriberInfo); + } + + + @Test + public void testToString() throws Exception { + RequestDetails testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } + + + @Test + public void testGetAdditionalProperties() throws Exception { + RequestDetails testSubject; + Map<String, Object> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getAdditionalProperties(); + } + + + @Test + public void testSetAdditionalProperty() throws Exception { + RequestDetails testSubject; + String name = ""; + Object value = null; + + // default test + testSubject = createTestSubject(); + testSubject.setAdditionalProperty(name, value); + } + + + @Test + public void testHashCode() throws Exception { + RequestDetails testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.hashCode(); + } + + + @Test + public void testEquals() throws Exception { + RequestDetails testSubject; + Object other = null; + boolean result; + + // default test + testSubject = createTestSubject(); + result = testSubject.equals(other); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/TestSuite.java new file mode 100644 index 00000000..ef86682f --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/mso/rest/TestSuite.java @@ -0,0 +1,12 @@ +package org.openecomp.vid.mso.rest; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( + +{ RelatedModelTest.class, AsyncRequestStatusTest.class, RequestDetailsTest.class, + RelatedInstanceTest.class }) +public class TestSuite { // nothing +} diff --git a/vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyResponseWrapperTest.java b/vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyResponseWrapperTest.java new file mode 100644 index 00000000..21a33725 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyResponseWrapperTest.java @@ -0,0 +1,70 @@ +package org.openecomp.vid.policy; + +import org.junit.Test; + +public class PolicyResponseWrapperTest { + + private PolicyResponseWrapper createTestSubject() { + return new PolicyResponseWrapper(); + } + + @Test + public void testGetEntity() throws Exception { + PolicyResponseWrapper testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getEntity(); + } + + @Test + public void testGetStatus() throws Exception { + PolicyResponseWrapper testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getStatus(); + } + + @Test + public void testSetStatus() throws Exception { + PolicyResponseWrapper testSubject; + int v = 0; + + // default test + testSubject = createTestSubject(); + testSubject.setStatus(v); + } + + @Test + public void testSetEntity() throws Exception { + PolicyResponseWrapper testSubject; + String v = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setEntity(v); + } + + @Test + public void testToString() throws Exception { + PolicyResponseWrapper testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } + + @Test + public void testGetResponse() throws Exception { + PolicyResponseWrapper testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getResponse(); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyRestIntTest.java b/vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyRestIntTest.java new file mode 100644 index 00000000..54181656 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyRestIntTest.java @@ -0,0 +1,22 @@ +package org.openecomp.vid.policy; + +import org.junit.Test; +import org.openecomp.vid.policy.rest.RequestDetails; + +public class PolicyRestIntTest { + + private PolicyRestInt createTestSubject() { + return new PolicyRestInt(); + } + + @Test + public void testLogRequest() throws Exception { + PolicyRestInt testSubject; + RequestDetails r = null; + + // test 1 + testSubject = createTestSubject(); + r = null; + testSubject.logRequest(r); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyRestInterfaceTest.java b/vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyRestInterfaceTest.java new file mode 100644 index 00000000..29e13624 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyRestInterfaceTest.java @@ -0,0 +1,24 @@ +package org.openecomp.vid.policy; + +import org.apache.poi.hssf.record.formula.functions.T; +import org.json.simple.JSONObject; +import org.junit.Test; +import org.openecomp.vid.policy.rest.RequestDetails; + +public class PolicyRestInterfaceTest { + + private PolicyRestInterface createTestSubject() { + return new PolicyRestInterface(); + } + + + @Test + public void testLogRequest() throws Exception { + PolicyRestInterface testSubject; + RequestDetails r = null; + + // default test + testSubject = createTestSubject(); + testSubject.logRequest(r); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyUtilTest.java b/vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyUtilTest.java new file mode 100644 index 00000000..b7f88ac3 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/policy/PolicyUtilTest.java @@ -0,0 +1,54 @@ +package org.openecomp.vid.policy; + +import org.apache.poi.hssf.record.formula.functions.T; +import org.glassfish.jersey.client.ClientResponse; +import org.junit.Assert; +import org.junit.Test; + +public class PolicyUtilTest { + + private PolicyUtil createTestSubject() { + return new PolicyUtil(); + } + + @Test + public void testWrapResponse() throws Exception { + String body = ""; + int statusCode = 0; + PolicyResponseWrapper result; + + // default test + result = PolicyUtil.wrapResponse(body, statusCode); + } + + + @Test + public void testWrapResponse_2() throws Exception { + RestObject<String> rs = null; + PolicyResponseWrapper result; + + // test 1 + rs = null; + result = PolicyUtil.wrapResponse(rs); + Assert.assertNotNull(result); + } + + @Test + public void testConvertPojoToString() throws Exception { + T t = null; + String result; + + // test 1 + t = null; + result = PolicyUtil.convertPojoToString(t); + Assert.assertEquals("", result); + } + + @Test + public void testMain() throws Exception { + String[] args = new String[] { "" }; + + // default test + PolicyUtil.main(args); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/policy/RestObjectTest.java b/vid-app-common/src/test/java/org/openecomp/vid/policy/RestObjectTest.java new file mode 100644 index 00000000..a961a1a4 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/policy/RestObjectTest.java @@ -0,0 +1,50 @@ +package org.openecomp.vid.policy; + +import org.apache.poi.hssf.record.formula.functions.T; +import org.junit.Test; + +public class RestObjectTest { + + private RestObject createTestSubject() { + return new RestObject(); + } + + @Test + public void testSet() throws Exception { + RestObject testSubject; + T t = null; + + // default test + testSubject = createTestSubject(); + testSubject.set(t); + } + + @Test + public void testGet() throws Exception { + RestObject testSubject; + + // default test + testSubject = createTestSubject(); + testSubject.get(); + } + + @Test + public void testSetStatusCode() throws Exception { + RestObject testSubject; + int v = 0; + + // default test + testSubject = createTestSubject(); + testSubject.setStatusCode(v); + } + + @Test + public void testGetStatusCode() throws Exception { + RestObject testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getStatusCode(); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/policy/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/policy/TestSuite.java new file mode 100644 index 00000000..b0ff4659 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/policy/TestSuite.java @@ -0,0 +1,12 @@ +package org.openecomp.vid.policy; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( + +{ RestObjectTest.class, PolicyResponseWrapperTest.class, PolicyRestIntTest.class, PolicyUtilTest.class, + PolicyRestInterfaceTest.class }) +public class TestSuite { // nothing +} diff --git a/vid-app-common/src/test/java/org/openecomp/vid/properties/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/properties/TestSuite.java new file mode 100644 index 00000000..b2993084 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/properties/TestSuite.java @@ -0,0 +1,11 @@ +package org.openecomp.vid.properties; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( + +{ VidPropertiesTest.class }) +public class TestSuite { // nothing +} diff --git a/vid-app-common/src/test/java/org/openecomp/vid/properties/VidPropertiesTest.java b/vid-app-common/src/test/java/org/openecomp/vid/properties/VidPropertiesTest.java new file mode 100644 index 00000000..7d318c74 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/properties/VidPropertiesTest.java @@ -0,0 +1,31 @@ +package org.openecomp.vid.properties; + +import org.junit.Test; + + +public class VidPropertiesTest { + + private VidProperties createTestSubject() { + return new VidProperties(); + } + + + @Test + public void testGetAsdcModelNamespace() throws Exception { + String result; + + // default test + result = VidProperties.getAsdcModelNamespace(); + } + + + @Test + public void testGetPropertyWithDefault() throws Exception { + String propName = ""; + String defaultValue = ""; + String result; + + // default test + result = VidProperties.getPropertyWithDefault(propName, defaultValue); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostCreateNewVnfWrapperTest.java b/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostCreateNewVnfWrapperTest.java new file mode 100644 index 00000000..16675dd1 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostCreateNewVnfWrapperTest.java @@ -0,0 +1,55 @@ +package org.openecomp.vid.scheduler.SchedulerResponseWrappers; + +import org.junit.Test; + + +public class PostCreateNewVnfWrapperTest { + + private PostCreateNewVnfWrapper createTestSubject() { + return new PostCreateNewVnfWrapper(); + } + + + @Test + public void testGetUuid() throws Exception { + PostCreateNewVnfWrapper testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getUuid(); + } + + + @Test + public void testSetUuid() throws Exception { + PostCreateNewVnfWrapper testSubject; + String v = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setUuid(v); + } + + + @Test + public void testToString() throws Exception { + PostCreateNewVnfWrapper testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } + + + @Test + public void testGetResponse() throws Exception { + PostCreateNewVnfWrapper testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getResponse(); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostSubmitVnfChangeTimeSlotsWrapperTest.java b/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostSubmitVnfChangeTimeSlotsWrapperTest.java new file mode 100644 index 00000000..ffe03bf0 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/PostSubmitVnfChangeTimeSlotsWrapperTest.java @@ -0,0 +1,55 @@ +package org.openecomp.vid.scheduler.SchedulerResponseWrappers; + +import org.junit.Test; + + +public class PostSubmitVnfChangeTimeSlotsWrapperTest { + + private PostSubmitVnfChangeTimeSlotsWrapper createTestSubject() { + return new PostSubmitVnfChangeTimeSlotsWrapper(); + } + + + @Test + public void testGetUuid() throws Exception { + PostSubmitVnfChangeTimeSlotsWrapper testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getUuid(); + } + + + @Test + public void testSetUuid() throws Exception { + PostSubmitVnfChangeTimeSlotsWrapper testSubject; + String v = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setUuid(v); + } + + + @Test + public void testToString() throws Exception { + PostSubmitVnfChangeTimeSlotsWrapper testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } + + + @Test + public void testGetResponse() throws Exception { + PostSubmitVnfChangeTimeSlotsWrapper testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getResponse(); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/SchedulerResponseWrapperTest.java b/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/SchedulerResponseWrapperTest.java new file mode 100644 index 00000000..c0fcb591 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/SchedulerResponseWrapperTest.java @@ -0,0 +1,77 @@ +package org.openecomp.vid.scheduler.SchedulerResponseWrappers; + +import org.junit.Test; + + +public class SchedulerResponseWrapperTest { + + private SchedulerResponseWrapper createTestSubject() { + return new SchedulerResponseWrapper(); + } + + + @Test + public void testGetEntity() throws Exception { + SchedulerResponseWrapper testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getEntity(); + } + + + @Test + public void testGetStatus() throws Exception { + SchedulerResponseWrapper testSubject; + int result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getStatus(); + } + + + @Test + public void testSetStatus() throws Exception { + SchedulerResponseWrapper testSubject; + int v = 0; + + // default test + testSubject = createTestSubject(); + testSubject.setStatus(v); + } + + + @Test + public void testSetEntity() throws Exception { + SchedulerResponseWrapper testSubject; + String v = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setEntity(v); + } + + + @Test + public void testToString() throws Exception { + SchedulerResponseWrapper testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } + + + @Test + public void testGetResponse() throws Exception { + SchedulerResponseWrapper testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getResponse(); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/TestSuite.java new file mode 100644 index 00000000..a85a9f3d --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerResponseWrappers/TestSuite.java @@ -0,0 +1,12 @@ +package org.openecomp.vid.scheduler.SchedulerResponseWrappers; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( + +{ PostSubmitVnfChangeTimeSlotsWrapperTest.class, PostCreateNewVnfWrapperTest.class, + SchedulerResponseWrapperTest.class }) +public class TestSuite { // nothing +} diff --git a/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerRestInterfaceTest.java b/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerRestInterfaceTest.java new file mode 100644 index 00000000..9dba924f --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/scheduler/SchedulerRestInterfaceTest.java @@ -0,0 +1,26 @@ +package org.openecomp.vid.scheduler; + +import org.apache.poi.hssf.record.formula.functions.T; +import org.json.simple.JSONObject; +import org.junit.Test; + +public class SchedulerRestInterfaceTest { + + private SchedulerRestInterface createTestSubject() { + return new SchedulerRestInterface(); + } + + + + @Test + public void testLogRequest() throws Exception { + SchedulerRestInterface testSubject; + JSONObject requestDetails = null; + + // default test + testSubject = createTestSubject(); + testSubject.logRequest(requestDetails); + } + + +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/scheduler/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/scheduler/TestSuite.java new file mode 100644 index 00000000..8babb388 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/scheduler/TestSuite.java @@ -0,0 +1,11 @@ +package org.openecomp.vid.scheduler; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( + +{ SchedulerRestInterfaceTest.class, org.openecomp.vid.scheduler.SchedulerResponseWrappers.TestSuite.class }) +public class TestSuite { // nothing +} diff --git a/vid-app-common/src/test/java/org/openecomp/vid/services/ChangeManagementServiceImplTest.java b/vid-app-common/src/test/java/org/openecomp/vid/services/ChangeManagementServiceImplTest.java new file mode 100644 index 00000000..bd1e72b7 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/services/ChangeManagementServiceImplTest.java @@ -0,0 +1,69 @@ +package org.openecomp.vid.services; + +import static org.junit.Assert.*; +import java.util.*; + +import org.json.simple.JSONArray; +import org.junit.Assert; +import org.junit.Test; +import org.openecomp.vid.changeManagement.ChangeManagementRequest; +import org.openecomp.vid.changeManagement.RequestDetails; +import org.openecomp.vid.mso.rest.Request; +import org.springframework.http.ResponseEntity; + +public class ChangeManagementServiceImplTest { + + private ChangeManagementServiceImpl createTestSubject() { + return new ChangeManagementServiceImpl(); + } + + + /*@Test + public void testGetMSOChangeManagements() throws Exception { + ChangeManagementServiceImpl testSubject; + Collection<Request> result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getMSOChangeManagements(); + } + + + @Test + public void testFindRequestByVnfName() throws Exception { + ChangeManagementServiceImpl testSubject;List<RequestDetails> requests = null; + String vnfName = ""; + RequestDetails result; + + // test 1 + testSubject=createTestSubject();requests = null; + result=Deencapsulation.invoke(testSubject, "findRequestByVnfName", new Object[]{List<RequestDetails>.class, vnfName}); + Assert.assertEquals(null, result); + }*/ + + + @Test + public void testDoChangeManagement() throws Exception { + ChangeManagementServiceImpl testSubject; + ChangeManagementRequest request = null; + String vnfName = ""; + ResponseEntity<String> result; + + // test 1 + testSubject = createTestSubject(); + request = null; + result = testSubject.doChangeManagement(request, vnfName); + Assert.assertEquals(null, result); + } + + + @Test + public void testGetSchedulerChangeManagements() throws Exception { + ChangeManagementServiceImpl testSubject; + JSONArray result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getSchedulerChangeManagements(); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/services/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/services/TestSuite.java new file mode 100644 index 00000000..c6c5eb1f --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/services/TestSuite.java @@ -0,0 +1,11 @@ +package org.openecomp.vid.services; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( + +{ ChangeManagementServiceImplTest.class, ChangeManagementServiceTest.class }) +public class TestSuite { // nothing +} |