diff options
author | Jorge Hernandez <jh1730@att.com> | 2018-01-19 18:56:33 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-01-19 18:56:33 +0000 |
commit | 7b6f0942e355b0405bc47e2e4d276e43c63edde1 (patch) | |
tree | 13edb6d3ad7f4939793e7e2a56293297e08e9d53 /controlloop/common/simulators | |
parent | aea5bb6c44470a38ef7c7012b6c8cd3646e8cc96 (diff) | |
parent | cef733a2902a600c1b4a95ef11b2f4ffc0fcbf99 (diff) |
Merge "Fix Technical Debt, add Unit tests for SO"
Diffstat (limited to 'controlloop/common/simulators')
-rw-r--r-- | controlloop/common/simulators/src/test/java/org/onap/policy/simulators/SoSimulatorTest.java | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/controlloop/common/simulators/src/test/java/org/onap/policy/simulators/SoSimulatorTest.java b/controlloop/common/simulators/src/test/java/org/onap/policy/simulators/SoSimulatorTest.java index 8054d214a..8ea0062cc 100644 --- a/controlloop/common/simulators/src/test/java/org/onap/policy/simulators/SoSimulatorTest.java +++ b/controlloop/common/simulators/src/test/java/org/onap/policy/simulators/SoSimulatorTest.java @@ -69,34 +69,34 @@ public class SoSimulatorTest { // Construct SO Request final SORequest request = new SORequest(); - request.requestId = UUID.randomUUID(); - request.requestDetails = new SORequestDetails(); - request.requestDetails.modelInfo = new SOModelInfo(); - request.requestDetails.cloudConfiguration = new SOCloudConfiguration(); - request.requestDetails.requestInfo = new SORequestInfo(); - request.requestDetails.requestParameters = new SORequestParameters(); - request.requestDetails.requestParameters.userParams = null; + request.setRequestId(UUID.randomUUID()); + request.setRequestDetails(new SORequestDetails()); + request.getRequestDetails().setModelInfo(new SOModelInfo()); + request.getRequestDetails().setCloudConfiguration(new SOCloudConfiguration()); + request.getRequestDetails().setRequestInfo(new SORequestInfo()); + request.getRequestDetails().setRequestParameters(new SORequestParameters()); + request.getRequestDetails().getRequestParameters().setUserParams(null); // // cloudConfiguration // - request.requestDetails.cloudConfiguration.lcpCloudRegionId = "DFW"; - request.requestDetails.cloudConfiguration.tenantId = "1015548"; + request.getRequestDetails().getCloudConfiguration().setLcpCloudRegionId("DFW"); + request.getRequestDetails().getCloudConfiguration().setTenantId("1015548"); // // modelInfo // - request.requestDetails.modelInfo.modelType = "vfModule"; - request.requestDetails.modelInfo.modelInvariantId = "f32568ec-2f1c-458a-864b-0593d53d141a"; - request.requestDetails.modelInfo.modelVersionId = "69615025-879d-4f0d-afe3-b7d1a7eeed1f"; - request.requestDetails.modelInfo.modelName = "C15ce9e1E9144c8fB8bb..dnsscaling..module-1"; - request.requestDetails.modelInfo.modelVersion = "1.0"; + request.getRequestDetails().getModelInfo().setModelType("vfModule"); + request.getRequestDetails().getModelInfo().setModelInvariantId("f32568ec-2f1c-458a-864b-0593d53d141a"); + request.getRequestDetails().getModelInfo().setModelVersionId("69615025-879d-4f0d-afe3-b7d1a7eeed1f"); + request.getRequestDetails().getModelInfo().setModelName("C15ce9e1E9144c8fB8bb..dnsscaling..module-1"); + request.getRequestDetails().getModelInfo().setModelVersion("1.0"); // // requestInfo // - request.requestDetails.requestInfo.instanceName = - "vDNS_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8"; - request.requestDetails.requestInfo.source = "POLICY"; - request.requestDetails.requestInfo.suppressRollback = false; - request.requestDetails.requestInfo.requestorId = "policy"; + request.getRequestDetails().getRequestInfo().setInstanceName( + "vDNS_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8"); + request.getRequestDetails().getRequestInfo().setSource("POLICY"); + request.getRequestDetails().getRequestInfo().setSuppressRollback(false); + request.getRequestDetails().getRequestInfo().setRequestorId("policy"); // // relatedInstanceList // @@ -104,33 +104,33 @@ public class SoSimulatorTest { new SORelatedInstanceListElement(); final SORelatedInstanceListElement relatedInstanceListElement2 = new SORelatedInstanceListElement(); - relatedInstanceListElement1.relatedInstance = new SORelatedInstance(); - relatedInstanceListElement2.relatedInstance = new SORelatedInstance(); + relatedInstanceListElement1.setRelatedInstance(new SORelatedInstance()); + relatedInstanceListElement2.setRelatedInstance(new SORelatedInstance()); // - relatedInstanceListElement1.relatedInstance.instanceId = "cf8426a6-0b53-4e3d-bfa6-4b2f4d5913a5"; - relatedInstanceListElement1.relatedInstance.modelInfo = new SOModelInfo(); - relatedInstanceListElement1.relatedInstance.modelInfo.modelType = "service"; - relatedInstanceListElement1.relatedInstance.modelInfo.modelInvariantId = - "4fcbc1c0-7793-46d8-8aa1-fa1c2ed9ec7b"; - relatedInstanceListElement1.relatedInstance.modelInfo.modelVersionId = - "5c996219-b2e2-4c76-9b43-7e8672a33c1d"; - relatedInstanceListElement1.relatedInstance.modelInfo.modelName = "8330e932-2a23-4943-8606"; - relatedInstanceListElement1.relatedInstance.modelInfo.modelVersion = "1.0"; + relatedInstanceListElement1.getRelatedInstance().setInstanceId("cf8426a6-0b53-4e3d-bfa6-4b2f4d5913a5"); + relatedInstanceListElement1.getRelatedInstance().setModelInfo(new SOModelInfo()); + relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelType("service"); + relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelInvariantId( + "4fcbc1c0-7793-46d8-8aa1-fa1c2ed9ec7b"); + relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelVersionId( + "5c996219-b2e2-4c76-9b43-7e8672a33c1d"); + relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelName("8330e932-2a23-4943-8606"); + relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelVersion("1.0"); // - relatedInstanceListElement2.relatedInstance.instanceId = "594e2fe0-48b8-41ff-82e2-3d4bab69b192"; - relatedInstanceListElement2.relatedInstance.modelInfo = new SOModelInfo(); - relatedInstanceListElement2.relatedInstance.modelInfo.modelType = "vnf"; - relatedInstanceListElement2.relatedInstance.modelInfo.modelInvariantId = - "033a32ed-aa65-4764-a736-36f2942f1aa0"; - relatedInstanceListElement2.relatedInstance.modelInfo.modelVersionId = - "d4d072dc-4e21-4a03-9524-628985819a8e"; - relatedInstanceListElement2.relatedInstance.modelInfo.modelName = "c15ce9e1-e914-4c8f-b8bb"; - relatedInstanceListElement2.relatedInstance.modelInfo.modelVersion = "1"; - relatedInstanceListElement2.relatedInstance.modelInfo.modelCustomizationName = - "c15ce9e1-e914-4c8f-b8bb 1"; + relatedInstanceListElement2.getRelatedInstance().setInstanceId("594e2fe0-48b8-41ff-82e2-3d4bab69b192"); + relatedInstanceListElement2.getRelatedInstance().setModelInfo(new SOModelInfo()); + relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelType("vnf"); + relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelInvariantId( + "033a32ed-aa65-4764-a736-36f2942f1aa0"); + relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelVersionId( + "d4d072dc-4e21-4a03-9524-628985819a8e"); + relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelName("c15ce9e1-e914-4c8f-b8bb"); + relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelVersion("1"); + relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelCustomizationName( + "c15ce9e1-e914-4c8f-b8bb 1"); // - request.requestDetails.relatedInstanceList.add(relatedInstanceListElement1); - request.requestDetails.relatedInstanceList.add(relatedInstanceListElement2); + request.getRequestDetails().getRelatedInstanceList().add(relatedInstanceListElement1); + request.getRequestDetails().getRelatedInstanceList().add(relatedInstanceListElement2); return request; } |