diff options
Diffstat (limited to 'vid-app-common/src/test/java/org/openecomp/vid/mso')
10 files changed, 738 insertions, 1 deletions
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 +} |