summaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/so/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-01-11 11:46:55 -0500
committerJim Hahn <jrh3@att.com>2019-01-11 11:46:55 -0500
commit4b3d5ae4a7ae81dc337c81abc282d1e2fa7213c5 (patch)
treef7eeb9c24153882dbc110f41bba405bf4c6543ca /controlloop/common/model-impl/so/src/test
parent7264e7361fe0366e8f0298a74b28dc2b86946600 (diff)
Remove model-impl/so checkstyle suppressions
Renamed classes from "SOxxx" to "SoXxx". Also renamed a few method names to make them camelcase, too. Updated drl files with above changes. Change-Id: I06aa303a20911733f870947c55e01f3a2dc66fa3 Issue-ID: POLICY-1143 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/model-impl/so/src/test')
-rw-r--r--controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java82
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoAsyncRequestStatusTest.java9
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoCloudConfigurationTest.java5
-rw-r--r--controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoDummyServerTest.java28
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoInstanceReferencesTest.java5
-rw-r--r--controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoManagerTest.java101
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoModelInfoTest.java5
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoPolicyExceptionHolderTest.java6
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceListElementTest.java7
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceTest.java8
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java32
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestErrorTest.java9
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestInfoTest.java5
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestParametersTest.java5
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestReferencesTest.java5
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestStatusTest.java5
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestTest.java7
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseTest.java11
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java44
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoServiceExceptionHolderTest.java5
-rwxr-xr-xcontrolloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoSubscriberInfoTest.java5
21 files changed, 203 insertions, 186 deletions
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java
index 43cce61e1..2db347846 100644
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* mso
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,14 +24,14 @@ import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
-import org.onap.policy.so.SOCloudConfiguration;
-import org.onap.policy.so.SOModelInfo;
-import org.onap.policy.so.SORelatedInstance;
-import org.onap.policy.so.SORelatedInstanceListElement;
-import org.onap.policy.so.SORequest;
-import org.onap.policy.so.SORequestDetails;
-import org.onap.policy.so.SORequestInfo;
-import org.onap.policy.so.SORequestParameters;
+import org.onap.policy.so.SoCloudConfiguration;
+import org.onap.policy.so.SoModelInfo;
+import org.onap.policy.so.SoRelatedInstance;
+import org.onap.policy.so.SoRelatedInstanceListElement;
+import org.onap.policy.so.SoRequest;
+import org.onap.policy.so.SoRequestDetails;
+import org.onap.policy.so.SoRequestInfo;
+import org.onap.policy.so.SoRequestParameters;
import org.onap.policy.so.util.Serialization;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -42,12 +42,12 @@ public class DemoTest {
@Test
public void test() {
- SORequest request = new SORequest();
- request.setRequestDetails(new SORequestDetails());
- request.getRequestDetails().setModelInfo(new SOModelInfo());
- request.getRequestDetails().setCloudConfiguration(new SOCloudConfiguration());
- request.getRequestDetails().setRequestInfo(new SORequestInfo());
- request.getRequestDetails().setRequestParameters(new SORequestParameters());
+ SoRequest request = new SoRequest();
+ 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().getModelInfo().setModelType("vfModule");
request.getRequestDetails().getModelInfo().setModelInvariantId("ff5256d2-5a33-55df-13ab-12abad84e7ff");
@@ -62,25 +62,25 @@ public class DemoTest {
request.getRequestDetails().getRequestInfo().setSource("VID");
request.getRequestDetails().getRequestInfo().setSuppressRollback(true);
- SORelatedInstanceListElement relatedInstanceListElement1 =
- new SORelatedInstanceListElement();
- SORelatedInstanceListElement relatedInstanceListElement2 =
- new SORelatedInstanceListElement();
- SORelatedInstanceListElement relatedInstanceListElement3 =
- new SORelatedInstanceListElement();
- relatedInstanceListElement1.setRelatedInstance(new SORelatedInstance());
- relatedInstanceListElement2.setRelatedInstance(new SORelatedInstance());
- relatedInstanceListElement3.setRelatedInstance(new SORelatedInstance());
+ SoRelatedInstanceListElement relatedInstanceListElement1 =
+ new SoRelatedInstanceListElement();
+ SoRelatedInstanceListElement relatedInstanceListElement2 =
+ new SoRelatedInstanceListElement();
+ SoRelatedInstanceListElement relatedInstanceListElement3 =
+ new SoRelatedInstanceListElement();
+ relatedInstanceListElement1.setRelatedInstance(new SoRelatedInstance());
+ relatedInstanceListElement2.setRelatedInstance(new SoRelatedInstance());
+ relatedInstanceListElement3.setRelatedInstance(new SoRelatedInstance());
relatedInstanceListElement1.getRelatedInstance().setInstanceId(
"17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c");
relatedInstanceListElement1.getRelatedInstance().setInstanceName(
"SOTESTVOL103a-vSAMP12_base_module-0_vol");
- relatedInstanceListElement1.getRelatedInstance().setModelInfo(new SOModelInfo());
+ relatedInstanceListElement1.getRelatedInstance().setModelInfo(new SoModelInfo());
relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelType("volumeGroup");
relatedInstanceListElement2.getRelatedInstance().setInstanceId("serviceInstanceId");
- relatedInstanceListElement2.getRelatedInstance().setModelInfo(new SOModelInfo());
+ relatedInstanceListElement2.getRelatedInstance().setModelInfo(new SoModelInfo());
relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelType("service");
relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelInvariantId(
"ff3514e3-5a33-55df-13ab-12abad84e7ff");
@@ -91,7 +91,7 @@ public class DemoTest {
relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelVersion("1.0");
relatedInstanceListElement3.getRelatedInstance().setInstanceId("vnfInstanceId");
- relatedInstanceListElement3.getRelatedInstance().setModelInfo(new SOModelInfo());
+ relatedInstanceListElement3.getRelatedInstance().setModelInfo(new SoModelInfo());
relatedInstanceListElement3.getRelatedInstance().getModelInfo().setModelType("vnf");
relatedInstanceListElement3.getRelatedInstance().getModelInfo().setModelInvariantId(
"ff5256d1-5a33-55df-13ab-12abad84e7ff");
@@ -123,13 +123,13 @@ public class DemoTest {
logger.debug("** HACK **");
- SORequest request = new SORequest();
+ SoRequest request = new SoRequest();
- 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.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);
request.getRequestDetails().getModelInfo().setModelType("vfModule");
@@ -146,16 +146,16 @@ public class DemoTest {
request.getRequestDetails().getRequestInfo().setSource("POLICY");
request.getRequestDetails().getRequestInfo().setSuppressRollback(false);
- SORelatedInstanceListElement relatedInstanceListElement1 =
- new SORelatedInstanceListElement();
- SORelatedInstanceListElement relatedInstanceListElement2 =
- new SORelatedInstanceListElement();
- relatedInstanceListElement1.setRelatedInstance(new SORelatedInstance());
- relatedInstanceListElement2.setRelatedInstance(new SORelatedInstance());
+ SoRelatedInstanceListElement relatedInstanceListElement1 =
+ new SoRelatedInstanceListElement();
+ SoRelatedInstanceListElement relatedInstanceListElement2 =
+ new SoRelatedInstanceListElement();
+ relatedInstanceListElement1.setRelatedInstance(new SoRelatedInstance());
+ relatedInstanceListElement2.setRelatedInstance(new SoRelatedInstance());
String serviceInstanceId = "98af39ce-6408-466b-921f-c2c7a8f59ed6";
relatedInstanceListElement1.getRelatedInstance().setInstanceId(serviceInstanceId);
- relatedInstanceListElement1.getRelatedInstance().setModelInfo(new SOModelInfo());
+ relatedInstanceListElement1.getRelatedInstance().setModelInfo(new SoModelInfo());
relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelType("service");
relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelInvariantId(
"24329a0c-1d57-4210-b1af-a65df64e9d59");
@@ -166,7 +166,7 @@ public class DemoTest {
String vnfInstanceId = "8eb411b8-a936-412f-b01f-9a9a435c0e93";
relatedInstanceListElement2.getRelatedInstance().setInstanceId(vnfInstanceId);
- relatedInstanceListElement2.getRelatedInstance().setModelInfo(new SOModelInfo());
+ relatedInstanceListElement2.getRelatedInstance().setModelInfo(new SoModelInfo());
relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelType("vnf");
relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelInvariantId(
"09fd971e-db5f-475d-997c-cf6704b6b8fe");
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoAsyncRequestStatusTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoAsyncRequestStatusTest.java
index d6fd0ad25..64467b299 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoAsyncRequestStatusTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoAsyncRequestStatusTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,7 +32,7 @@ public class SoAsyncRequestStatusTest {
@Test
public void testConstructor() {
- SOAsyncRequestStatus obj = new SOAsyncRequestStatus();
+ SoAsyncRequestStatus obj = new SoAsyncRequestStatus();
assertTrue(obj.getCorrelator() == null);
assertTrue(obj.getFinishTime() == null);
@@ -44,7 +45,7 @@ public class SoAsyncRequestStatusTest {
@Test
public void testSetGet() {
- SOAsyncRequestStatus obj = new SOAsyncRequestStatus();
+ SoAsyncRequestStatus obj = new SoAsyncRequestStatus();
obj.setCorrelator("correlator");
assertEquals("correlator", obj.getCorrelator());
@@ -53,7 +54,7 @@ public class SoAsyncRequestStatusTest {
obj.setFinishTime(finishTime);
assertEquals(finishTime, obj.getFinishTime());
- SOInstanceReferences instanceReferences = new SOInstanceReferences();
+ SoInstanceReferences instanceReferences = new SoInstanceReferences();
obj.setInstanceReferences(instanceReferences);
assertEquals(instanceReferences, obj.getInstanceReferences());
@@ -63,7 +64,7 @@ public class SoAsyncRequestStatusTest {
obj.setRequestScope("requestScope");
assertEquals("requestScope", obj.getRequestScope());
- SORequestStatus requestStatus = new SORequestStatus();
+ SoRequestStatus requestStatus = new SoRequestStatus();
obj.setRequestStatus(requestStatus);
assertEquals(requestStatus, obj.getRequestStatus());
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoCloudConfigurationTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoCloudConfigurationTest.java
index 8b52ae9a2..0b6521be1 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoCloudConfigurationTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoCloudConfigurationTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@ public class SoCloudConfigurationTest {
@Test
public void testConstructor() {
- SOCloudConfiguration obj = new SOCloudConfiguration();
+ SoCloudConfiguration obj = new SoCloudConfiguration();
assertTrue(obj.getLcpCloudRegionId() == null);
assertTrue(obj.getTenantId() == null);
@@ -37,7 +38,7 @@ public class SoCloudConfigurationTest {
@Test
public void testSetGet() {
- SOCloudConfiguration obj = new SOCloudConfiguration();
+ SoCloudConfiguration obj = new SoCloudConfiguration();
obj.setLcpCloudRegionId("lcpCloudRegionId");
assertEquals("lcpCloudRegionId", obj.getLcpCloudRegionId());
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoDummyServerTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoDummyServerTest.java
index 17f92bcb9..5c302474a 100644
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoDummyServerTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoDummyServerTest.java
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
* ================================================================================
- * Modifications Copyright (C) 2018 AT&T. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ public class SoDummyServerTest {
private static int getMessagesReceived = 0;
private static int deleteMessagesReceived = 0;
- private static Map<String, SOResponse> ongoingRequestMap = new ConcurrentHashMap<>();
+ private static Map<String, SoResponse> ongoingRequestMap = new ConcurrentHashMap<>();
/**
* Stats method.
@@ -110,12 +110,12 @@ public class SoDummyServerTest {
@Path("/orchestrationRequests/v5/{nsInstanceId}")
public Response soRequestStatus(@PathParam("nsInstanceId") final String nsInstanceId) {
- SOResponse response = ongoingRequestMap.get(nsInstanceId);
+ SoResponse response = ongoingRequestMap.get(nsInstanceId);
int iterationsLeft = Integer.valueOf(response.getRequest().getRequestScope());
if (--iterationsLeft > 0) {
response.getRequest().setRequestScope(new Integer(iterationsLeft).toString());
- String responseString = new Gson().toJson(response, SOResponse.class);
+ String responseString = new Gson().toJson(response, SoResponse.class);
return Response.status(response.getHttpResponseCode()).entity(responseString).build();
}
@@ -128,7 +128,7 @@ public class SoDummyServerTest {
response.getRequest().getRequestStatus().setRequestState("COMPLETE");
response.getRequest().setRequestScope("0");
response.setHttpResponseCode(200);
- String responseString = new Gson().toJson(response, SOResponse.class);
+ String responseString = new Gson().toJson(response, SoResponse.class);
return Response.status(response.getHttpResponseCode()).entity(responseString).build();
}
@@ -157,9 +157,9 @@ public class SoDummyServerTest {
return Response.status(400).build();
}
- SORequest request = null;
+ SoRequest request = null;
try {
- request = new Gson().fromJson(jsonString, SORequest.class);
+ request = new Gson().fromJson(jsonString, SoRequest.class);
} catch (Exception e) {
return Response.status(400).build();
}
@@ -179,15 +179,15 @@ public class SoDummyServerTest {
+ ",\"DELETE\": " + deleteMessagesReceived + "}").build();
}
- SOResponse response = new SOResponse();
+ SoResponse response = new SoResponse();
response.setRequest(request);
- response.setRequestReferences(new SORequestReferences());
+ response.setRequestReferences(new SoRequestReferences());
response.getRequestReferences().setRequestId(request.getRequestId().toString());
if ("ReturnCompleted".equals(request.getRequestType())) {
response.getRequest().getRequestStatus().setRequestState("COMPLETE");
response.setHttpResponseCode(200);
- String responseString = new Gson().toJson(response, SOResponse.class);
+ String responseString = new Gson().toJson(response, SoResponse.class);
return Response.status(response.getHttpResponseCode())
.entity(responseString)
.build();
@@ -196,7 +196,7 @@ public class SoDummyServerTest {
if ("ReturnFailed".equals(request.getRequestType())) {
response.getRequest().getRequestStatus().setRequestState("FAILED");
response.setHttpResponseCode(200);
- String responseString = new Gson().toJson(response, SOResponse.class);
+ String responseString = new Gson().toJson(response, SoResponse.class);
return Response.status(response.getHttpResponseCode())
.entity(responseString)
.build();
@@ -207,7 +207,7 @@ public class SoDummyServerTest {
response.getRequest().getRequestStatus().setRequestState("ONGOING");
response.setHttpResponseCode(202);
- String responseString = new Gson().toJson(response, SOResponse.class);
+ String responseString = new Gson().toJson(response, SoResponse.class);
return Response.status(response.getHttpResponseCode())
.entity(responseString)
.build();
@@ -218,7 +218,7 @@ public class SoDummyServerTest {
response.getRequest().getRequestStatus().setRequestState("ONGOING");
response.setHttpResponseCode(200);
- String responseString = new Gson().toJson(response, SOResponse.class);
+ String responseString = new Gson().toJson(response, SoResponse.class);
return Response.status(response.getHttpResponseCode())
.entity(responseString)
.build();
@@ -229,7 +229,7 @@ public class SoDummyServerTest {
response.getRequest().getRequestStatus().setRequestState("ONGOING");
response.setHttpResponseCode(200);
- String responseString = new Gson().toJson(response, SOResponse.class);
+ String responseString = new Gson().toJson(response, SoResponse.class);
return Response.status(response.getHttpResponseCode())
.entity(responseString)
.build();
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoInstanceReferencesTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoInstanceReferencesTest.java
index 39e37f0cb..13d7dd83b 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoInstanceReferencesTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoInstanceReferencesTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@ public class SoInstanceReferencesTest {
@Test
public void testConstructor() {
- SOInstanceReferences obj = new SOInstanceReferences();
+ SoInstanceReferences obj = new SoInstanceReferences();
assertTrue(obj.getInstanceId() == null);
assertTrue(obj.getRequestId() == null);
@@ -37,7 +38,7 @@ public class SoInstanceReferencesTest {
@Test
public void testSetGet() {
- SOInstanceReferences obj = new SOInstanceReferences();
+ SoInstanceReferences obj = new SoInstanceReferences();
obj.setInstanceId("instanceId");
assertEquals("instanceId", obj.getInstanceId());
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoManagerTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoManagerTest.java
index c090513f6..e2482569d 100644
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoManagerTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoManagerTest.java
@@ -3,7 +3,8 @@
* TestSOManager
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Modifications Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -83,11 +84,11 @@ public class SoManagerTest {
@Test
public void testServiceInstantiation() throws IOException {
- SOManager manager = new SOManager();
+ SoManager manager = new SoManager();
assertNotNull(manager);
manager.setRestGetTimeout(100);
- SOResponse response = manager.createModuleInstance("http:/localhost:99999999", BASE_SO_URI, "sean",
+ SoResponse response = manager.createModuleInstance("http:/localhost:99999999", BASE_SO_URI, "sean",
"citizen", null);
assertNull(response);
@@ -96,15 +97,15 @@ public class SoManagerTest {
assertNull(response);
response = manager.createModuleInstance(BASE_SO_URI + "/serviceInstantiation/v7", BASE_SO_URI, "sean",
- "citizen", new SORequest());
+ "citizen", new SoRequest());
assertNull(response);
- SORequest request = new SORequest();
+ SoRequest request = new SoRequest();
request.setRequestId(UUID.randomUUID());
request.setRequestScope("Test");
request.setRequestType("ReturnBadJson");
request.setStartTime("2018-03-23 16:31");
- request.setRequestStatus(new SORequestStatus());
+ request.setRequestStatus(new SoRequestStatus());
request.getRequestStatus().setRequestState("ONGOING");
response = manager.createModuleInstance(BASE_SO_URI + "/serviceInstantiation/v7", BASE_SO_URI, "sean",
@@ -158,7 +159,7 @@ public class SoManagerTest {
@Test
public void testVfModuleCreation() throws IOException {
- SOManager manager = new SOManager();
+ SoManager manager = new SoManager();
assertNotNull(manager);
manager.setRestGetTimeout(100);
@@ -167,41 +168,41 @@ public class SoManagerTest {
WorkingMemory wm = new DummyWorkingMemory();
- SORequest soRequest = new SORequest();
+ SoRequest soRequest = new SoRequest();
soRequest.setOperationType(SoOperationType.SCALE_OUT);
PolicyEngine.manager.setEnvironmentProperty("so.url", "http:/localhost:99999999");
- Future<SOResponse> asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm,
+ Future<SoResponse> asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm,
UUID.randomUUID().toString(), UUID.randomUUID().toString(), soRequest);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals(999, response.getHttpResponseCode());
} catch (Exception e) {
fail("test should not throw an exception");
}
PolicyEngine.manager.setEnvironmentProperty("so.url", BASE_SO_URI);
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), soRequest);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals(999, response.getHttpResponseCode());
} catch (Exception e) {
fail("test should not throw an exception");
}
- SORequest request = new SORequest();
+ SoRequest request = new SoRequest();
request.setRequestId(UUID.randomUUID());
request.setRequestScope("Test");
request.setRequestType("ReturnBadJson");
request.setStartTime("2018-03-23 16:31");
- request.setRequestStatus(new SORequestStatus());
+ request.setRequestStatus(new SoRequestStatus());
request.getRequestStatus().setRequestState("ONGOING");
request.setOperationType(SoOperationType.SCALE_OUT);
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals(999, response.getHttpResponseCode());
} catch (Exception e) {
fail("test should not throw an exception");
@@ -209,20 +210,20 @@ public class SoManagerTest {
request.setRequestType("ReturnCompleted");
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
} catch (Exception e) {
fail("test should not throw an exception");
}
request.setRequestType("ReturnFailed");
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals("FAILED", response.getRequest().getRequestStatus().getRequestState());
} catch (Exception e) {
fail("test should not throw an exception");
@@ -232,10 +233,10 @@ public class SoManagerTest {
request.setRequestType("ReturnOnging200");
request.setRequestScope(new Integer(10).toString());
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertNotNull(response.getRequest());
assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
} catch (Exception e) {
@@ -244,10 +245,10 @@ public class SoManagerTest {
request.setRequestType("ReturnOnging202");
request.setRequestScope(new Integer(20).toString());
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertNotNull(response.getRequest());
assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
} catch (Exception e) {
@@ -257,10 +258,10 @@ public class SoManagerTest {
// Test timeout after 20 attempts for a response
request.setRequestType("ReturnOnging202");
request.setRequestScope(new Integer(21).toString());
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals(999, response.getHttpResponseCode());
} catch (Exception e) {
fail("test should not throw an exception");
@@ -269,10 +270,10 @@ public class SoManagerTest {
// Test bad response after 3 attempts for a response
request.setRequestType("ReturnBadAfterWait");
request.setRequestScope(new Integer(3).toString());
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals(999, response.getHttpResponseCode());
} catch (Exception e) {
fail("test should not throw an exception");
@@ -281,7 +282,7 @@ public class SoManagerTest {
@Test
public void testVfModuleDeletion() {
- SOManager manager = new SOManager();
+ SoManager manager = new SoManager();
assertNotNull(manager);
manager.setRestGetTimeout(100);
@@ -290,41 +291,41 @@ public class SoManagerTest {
WorkingMemory wm = new DummyWorkingMemory();
- SORequest soRequest = new SORequest();
+ SoRequest soRequest = new SoRequest();
soRequest.setOperationType(SoOperationType.DELETE_VF_MODULE);
PolicyEngine.manager.setEnvironmentProperty("so.url", "http:/localhost:99999999");
- Future<SOResponse> asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm,
+ Future<SoResponse> asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm,
UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString(), soRequest);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals(999, response.getHttpResponseCode());
} catch (Exception e) {
fail("test should not throw an exception");
}
PolicyEngine.manager.setEnvironmentProperty("so.url", BASE_SO_URI);
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), UUID.randomUUID().toString(), soRequest);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals(999, response.getHttpResponseCode());
} catch (Exception e) {
fail("test should not throw an exception");
}
- SORequest request = new SORequest();
+ SoRequest request = new SoRequest();
request.setRequestId(UUID.randomUUID());
request.setRequestScope("Test");
request.setRequestType("ReturnBadJson");
request.setStartTime("2018-03-23 16:31");
- request.setRequestStatus(new SORequestStatus());
+ request.setRequestStatus(new SoRequestStatus());
request.getRequestStatus().setRequestState("ONGOING");
request.setOperationType(SoOperationType.DELETE_VF_MODULE);
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals(999, response.getHttpResponseCode());
} catch (Exception e) {
fail("test should not throw an exception");
@@ -332,20 +333,20 @@ public class SoManagerTest {
request.setRequestType("ReturnCompleted");
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
} catch (Exception e) {
fail("test should not throw an exception");
}
request.setRequestType("ReturnFailed");
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals("FAILED", response.getRequest().getRequestStatus().getRequestState());
} catch (Exception e) {
fail("test should not throw an exception");
@@ -355,10 +356,10 @@ public class SoManagerTest {
request.setRequestType("ReturnOnging200");
request.setRequestScope(new Integer(10).toString());
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertNotNull(response.getRequest());
assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
} catch (Exception e) {
@@ -367,10 +368,10 @@ public class SoManagerTest {
request.setRequestType("ReturnOnging202");
request.setRequestScope(new Integer(20).toString());
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertNotNull(response.getRequest());
assertEquals("COMPLETE", response.getRequest().getRequestStatus().getRequestState());
} catch (Exception e) {
@@ -380,10 +381,10 @@ public class SoManagerTest {
// Test timeout after 20 attempts for a response
request.setRequestType("ReturnOnging202");
request.setRequestScope(new Integer(21).toString());
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals(999, response.getHttpResponseCode());
} catch (Exception e) {
fail("test should not throw an exception");
@@ -392,10 +393,10 @@ public class SoManagerTest {
// Test bad response after 3 attempts for a response
request.setRequestType("ReturnBadAfterWait");
request.setRequestScope(new Integer(3).toString());
- asyncRestCallFuture = manager.asyncSORestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
+ asyncRestCallFuture = manager.asyncSoRestCall(UUID.randomUUID().toString(), wm, UUID.randomUUID().toString(),
UUID.randomUUID().toString(), UUID.randomUUID().toString(), request);
try {
- SOResponse response = asyncRestCallFuture.get();
+ SoResponse response = asyncRestCallFuture.get();
assertEquals(999, response.getHttpResponseCode());
} catch (Exception e) {
fail("test should not throw an exception");
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoModelInfoTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoModelInfoTest.java
index 5898f04f0..3cc415cdd 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoModelInfoTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoModelInfoTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@ public class SoModelInfoTest {
@Test
public void testConstructor() {
- SOModelInfo obj = new SOModelInfo();
+ SoModelInfo obj = new SoModelInfo();
assertTrue(obj.getModelCustomizationId() == null);
assertTrue(obj.getModelCustomizationName() == null);
@@ -42,7 +43,7 @@ public class SoModelInfoTest {
@Test
public void testSetGet() {
- SOModelInfo obj = new SOModelInfo();
+ SoModelInfo obj = new SoModelInfo();
obj.setModelCustomizationId("modelCustomizationId");
assertEquals("modelCustomizationId", obj.getModelCustomizationId());
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoPolicyExceptionHolderTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoPolicyExceptionHolderTest.java
index 2dea68d8f..00dfb8dc6 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoPolicyExceptionHolderTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoPolicyExceptionHolderTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* so
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ public class SoPolicyExceptionHolderTest {
@Test
public void testConstructor() {
- SOPolicyExceptionHolder obj = new SOPolicyExceptionHolder();
+ SoPolicyExceptionHolder obj = new SoPolicyExceptionHolder();
assertTrue(obj.getMessageId() == null);
assertTrue(obj.getText() == null);
@@ -37,7 +37,7 @@ public class SoPolicyExceptionHolderTest {
@Test
public void testSetGet() {
- SOPolicyExceptionHolder obj = new SOPolicyExceptionHolder();
+ SoPolicyExceptionHolder obj = new SoPolicyExceptionHolder();
obj.setMessageId("messageId");
assertEquals("messageId", obj.getMessageId());
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceListElementTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceListElementTest.java
index 4c549361a..c73a0ea05 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceListElementTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceListElementTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,16 +30,16 @@ public class SoRelatedInstanceListElementTest {
@Test
public void testConstructor() {
- SORelatedInstanceListElement obj = new SORelatedInstanceListElement();
+ SoRelatedInstanceListElement obj = new SoRelatedInstanceListElement();
assertTrue(obj.getRelatedInstance() == null);
}
@Test
public void testSetGet() {
- SORelatedInstanceListElement obj = new SORelatedInstanceListElement();
+ SoRelatedInstanceListElement obj = new SoRelatedInstanceListElement();
- SORelatedInstance relatedInstance = new SORelatedInstance();
+ SoRelatedInstance relatedInstance = new SoRelatedInstance();
obj.setRelatedInstance(relatedInstance);
assertEquals(relatedInstance, obj.getRelatedInstance());
}
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceTest.java
index aa137e19f..70f585efe 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRelatedInstanceTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* so
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ public class SoRelatedInstanceTest {
@Test
public void testConstructor() {
- SORelatedInstance obj = new SORelatedInstance();
+ SoRelatedInstance obj = new SoRelatedInstance();
assertTrue(obj.getInstanceId() == null);
assertTrue(obj.getInstanceName() == null);
@@ -38,7 +38,7 @@ public class SoRelatedInstanceTest {
@Test
public void testSetGet() {
- SORelatedInstance obj = new SORelatedInstance();
+ SoRelatedInstance obj = new SoRelatedInstance();
obj.setInstanceId("instanceId");
assertEquals("instanceId", obj.getInstanceId());
@@ -46,7 +46,7 @@ public class SoRelatedInstanceTest {
obj.setInstanceName("instanceName");
assertEquals("instanceName", obj.getInstanceName());
- SOModelInfo modelInfo = new SOModelInfo();
+ SoModelInfo modelInfo = new SoModelInfo();
obj.setModelInfo(modelInfo);
assertEquals(modelInfo, obj.getModelInfo());
}
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java
index 71ae7ca66..7233482f6 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestDetailsTest.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -35,7 +37,7 @@ public class SoRequestDetailsTest {
@Test
public void testConstructor() {
- SORequestDetails obj = new SORequestDetails();
+ SoRequestDetails obj = new SoRequestDetails();
assertTrue(obj.getCloudConfiguration() == null);
assertTrue(obj.getModelInfo() == null);
@@ -49,68 +51,68 @@ public class SoRequestDetailsTest {
@Test
public void testSetGet() {
- SORequestDetails obj = new SORequestDetails();
+ SoRequestDetails obj = new SoRequestDetails();
- SOCloudConfiguration cloudConfiguration = new SOCloudConfiguration();
+ SoCloudConfiguration cloudConfiguration = new SoCloudConfiguration();
obj.setCloudConfiguration(cloudConfiguration);
assertEquals(cloudConfiguration, obj.getCloudConfiguration());
- SOModelInfo modelInfo = new SOModelInfo();
+ SoModelInfo modelInfo = new SoModelInfo();
obj.setModelInfo(modelInfo);
assertEquals(modelInfo, obj.getModelInfo());
- SORequestInfo requestInfo = new SORequestInfo();
+ SoRequestInfo requestInfo = new SoRequestInfo();
obj.setRequestInfo(requestInfo);
assertEquals(requestInfo, obj.getRequestInfo());
- SORequestParameters requestParameters = new SORequestParameters();
+ SoRequestParameters requestParameters = new SoRequestParameters();
obj.setRequestParameters(requestParameters);
assertEquals(requestParameters, obj.getRequestParameters());
- SOSubscriberInfo subscriberInfo = new SOSubscriberInfo();
+ SoSubscriberInfo subscriberInfo = new SoSubscriberInfo();
obj.setSubscriberInfo(subscriberInfo);
assertEquals(subscriberInfo, obj.getSubscriberInfo());
}
@Test
public void testSoMRequestDetailsMethods() {
- SORequestDetails details = new SORequestDetails();
+ SoRequestDetails details = new SoRequestDetails();
assertNotNull(details);
assertNotEquals(0, details.hashCode());
- SOCloudConfiguration cloudConfiguration = new SOCloudConfiguration();
+ SoCloudConfiguration cloudConfiguration = new SoCloudConfiguration();
details.setCloudConfiguration(cloudConfiguration);
assertEquals(cloudConfiguration, details.getCloudConfiguration());
assertNotEquals(0, details.hashCode());
- SOModelInfo modelInfo = new SOModelInfo();
+ SoModelInfo modelInfo = new SoModelInfo();
details.setModelInfo(modelInfo);
assertEquals(modelInfo, details.getModelInfo());
assertNotEquals(0, details.hashCode());
- List<SORelatedInstanceListElement> relatedInstanceList = new ArrayList<>();
+ List<SoRelatedInstanceListElement> relatedInstanceList = new ArrayList<>();
details.setRelatedInstanceList(relatedInstanceList);
assertEquals(relatedInstanceList, details.getRelatedInstanceList());
assertNotEquals(0, details.hashCode());
- SORequestInfo requestInfo = new SORequestInfo();
+ SoRequestInfo requestInfo = new SoRequestInfo();
details.setRequestInfo(requestInfo);
assertEquals(requestInfo, details.getRequestInfo());
assertNotEquals(0, details.hashCode());
- SORequestParameters requestParameters = new SORequestParameters();
+ SoRequestParameters requestParameters = new SoRequestParameters();
details.setRequestParameters(requestParameters);
assertEquals(requestParameters, details.getRequestParameters());
assertNotEquals(0, details.hashCode());
- SOSubscriberInfo subscriberInfo = new SOSubscriberInfo();
+ SoSubscriberInfo subscriberInfo = new SoSubscriberInfo();
details.setSubscriberInfo(subscriberInfo);
assertEquals(subscriberInfo, details.getSubscriberInfo());
assertNotEquals(0, details.hashCode());
assertEquals("SORequestDetails [modelInfo=org.onap.policy.so", details.toString().substring(0, 46));
- SORequestDetails copiedDetails = new SORequestDetails(details);
+ SoRequestDetails copiedDetails = new SoRequestDetails(details);
assertTrue(details.equals(details));
assertTrue(details.equals(copiedDetails));
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestErrorTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestErrorTest.java
index f700fbc70..b870dbd99 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestErrorTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestErrorTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@ public class SoRequestErrorTest {
@Test
public void testConstructor() {
- SORequestError obj = new SORequestError();
+ SoRequestError obj = new SoRequestError();
assertTrue(obj.getPolicyException() == null);
assertTrue(obj.getServiceException() == null);
@@ -37,13 +38,13 @@ public class SoRequestErrorTest {
@Test
public void testSetGet() {
- SORequestError obj = new SORequestError();
+ SoRequestError obj = new SoRequestError();
- SOPolicyExceptionHolder policyException = new SOPolicyExceptionHolder();
+ SoPolicyExceptionHolder policyException = new SoPolicyExceptionHolder();
obj.setPolicyException(policyException);
assertEquals(policyException, obj.getPolicyException());
- SOServiceExceptionHolder serviceException = new SOServiceExceptionHolder();
+ SoServiceExceptionHolder serviceException = new SoServiceExceptionHolder();
obj.setServiceException(serviceException);
assertEquals(serviceException, obj.getServiceException());
}
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestInfoTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestInfoTest.java
index c09da54dc..0e518018b 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestInfoTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestInfoTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@ public class SoRequestInfoTest {
@Test
public void testConstructor() {
- SORequestInfo obj = new SORequestInfo();
+ SoRequestInfo obj = new SoRequestInfo();
assertTrue(obj.getBillingAccountNumber() == null);
assertTrue(obj.getCallbackUrl() == null);
@@ -45,7 +46,7 @@ public class SoRequestInfoTest {
@Test
public void testSetGet() {
- SORequestInfo obj = new SORequestInfo();
+ SoRequestInfo obj = new SoRequestInfo();
obj.setBillingAccountNumber("billingAccountNumber");
assertEquals("billingAccountNumber", obj.getBillingAccountNumber());
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestParametersTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestParametersTest.java
index db93988c9..7d671f5e1 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestParametersTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestParametersTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@ public class SoRequestParametersTest {
@Test
public void testConstructor() {
- SORequestParameters obj = new SORequestParameters();
+ SoRequestParameters obj = new SoRequestParameters();
assertTrue(obj.getSubscriptionServiceType() == null);
assertTrue(obj.getUserParams() != null);
@@ -38,7 +39,7 @@ public class SoRequestParametersTest {
@Test
public void testSetGet() {
- SORequestParameters obj = new SORequestParameters();
+ SoRequestParameters obj = new SoRequestParameters();
obj.setSubscriptionServiceType("subscriptionServiceType");
assertEquals("subscriptionServiceType", obj.getSubscriptionServiceType());
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestReferencesTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestReferencesTest.java
index 5d6ff2090..549147e4b 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestReferencesTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestReferencesTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@ public class SoRequestReferencesTest {
@Test
public void testConstructor() {
- SORequestReferences obj = new SORequestReferences();
+ SoRequestReferences obj = new SoRequestReferences();
assertTrue(obj.getInstanceId() == null);
assertTrue(obj.getRequestId() == null);
@@ -37,7 +38,7 @@ public class SoRequestReferencesTest {
@Test
public void testSetGet() {
- SORequestReferences obj = new SORequestReferences();
+ SoRequestReferences obj = new SoRequestReferences();
obj.setInstanceId("instanceId");
assertEquals("instanceId", obj.getInstanceId());
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestStatusTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestStatusTest.java
index cd3e1b58a..39a3241a3 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestStatusTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestStatusTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +31,7 @@ public class SoRequestStatusTest {
@Test
public void testConstructor() {
- SORequestStatus obj = new SORequestStatus();
+ SoRequestStatus obj = new SoRequestStatus();
assertEquals(0, obj.getPercentProgress());
assertTrue(obj.getRequestState() == null);
@@ -40,7 +41,7 @@ public class SoRequestStatusTest {
@Test
public void testSetGet() {
- SORequestStatus obj = new SORequestStatus();
+ SoRequestStatus obj = new SoRequestStatus();
obj.setPercentProgress(2008);
assertEquals(2008, obj.getPercentProgress());
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestTest.java
index c09c58471..971b1d190 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoRequestTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +33,7 @@ public class SoRequestTest {
@Test
public void testConstructor() {
- SORequest obj = new SORequest();
+ SoRequest obj = new SoRequest();
assertTrue(obj.getFinishTime() == null);
assertTrue(obj.getRequestDetails() == null);
@@ -45,7 +46,7 @@ public class SoRequestTest {
@Test
public void testSetGet() {
- SORequest obj = new SORequest();
+ SoRequest obj = new SoRequest();
LocalDateTime finishTime = LocalDateTime.now();
obj.setFinishTime(finishTime);
@@ -58,7 +59,7 @@ public class SoRequestTest {
obj.setRequestScope("requestScope");
assertEquals("requestScope", obj.getRequestScope());
- SORequestStatus requestStatus = new SORequestStatus();
+ SoRequestStatus requestStatus = new SoRequestStatus();
obj.setRequestStatus(requestStatus);
assertEquals(requestStatus, obj.getRequestStatus());
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseTest.java
index cf396561b..c932ac969 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@ public class SoResponseTest {
@Test
public void testConstructor() {
- SOResponse obj = new SOResponse();
+ SoResponse obj = new SoResponse();
assertEquals(0, obj.getHttpResponseCode());
assertTrue(obj.getRequest() == null);
@@ -39,20 +40,20 @@ public class SoResponseTest {
@Test
public void testSetGet() {
- SOResponse obj = new SOResponse();
+ SoResponse obj = new SoResponse();
obj.setHttpResponseCode(2008);
assertEquals(2008, obj.getHttpResponseCode());
- SORequest request = new SORequest();
+ SoRequest request = new SoRequest();
obj.setRequest(request);
assertEquals(request, obj.getRequest());
- SORequestError requestError = new SORequestError();
+ SoRequestError requestError = new SoRequestError();
obj.setRequestError(requestError);
assertEquals(requestError, obj.getRequestError());
- SORequestReferences requestReferences = new SORequestReferences();
+ SoRequestReferences requestReferences = new SoRequestReferences();
obj.setRequestReferences(requestReferences);
assertEquals(requestReferences, obj.getRequestReferences());
}
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java
index 181fe2138..26bd75d2a 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoResponseWrapperTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* so
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,33 +33,33 @@ public class SoResponseWrapperTest {
@Test
public void testConstructor() {
- SOResponse response = new SOResponse();
- SOResponseWrapper obj = new SOResponseWrapper(response, "reqID");
+ SoResponse response = new SoResponse();
+ SoResponseWrapper obj = new SoResponseWrapper(response, "reqID");
assertEquals(response, obj.getSoResponse());
- assertEquals("reqID", obj.getRequestID());
+ assertEquals("reqID", obj.getRequestId());
}
@Test
public void testSetGet() {
- SOResponse response = new SOResponse();
- SOResponseWrapper obj = new SOResponseWrapper(response, "reqID");
+ SoResponse response = new SoResponse();
+ SoResponseWrapper obj = new SoResponseWrapper(response, "reqID");
- SOResponse response2 = new SOResponse();
+ SoResponse response2 = new SoResponse();
response2.setHttpResponseCode(2008);
obj.setSoResponse(response2);
assertEquals(response2, obj.getSoResponse());
- obj.setRequestID("id2");
- assertEquals("id2", obj.getRequestID());
+ obj.setRequestId("id2");
+ assertEquals("id2", obj.getRequestId());
}
@Test
public void testSoResponseWrapperMethods() {
String requestId = UUID.randomUUID().toString();
- SOResponse response = new SOResponse();
+ SoResponse response = new SoResponse();
- SOResponseWrapper responseWrapper = new SOResponseWrapper(response, requestId);
+ SoResponseWrapper responseWrapper = new SoResponseWrapper(response, requestId);
assertNotNull(responseWrapper);
assertNotEquals(0, responseWrapper.hashCode());
@@ -69,7 +69,7 @@ public class SoResponseWrapperTest {
assertEquals("SOResponseWrapper [SOResponse=org.onap.policy.", responseWrapper.toString().substring(0, 46));
- SOResponseWrapper identicalResponseWrapper = new SOResponseWrapper(response, requestId);
+ SoResponseWrapper identicalResponseWrapper = new SoResponseWrapper(response, requestId);
assertEquals(responseWrapper, responseWrapper);
assertEquals(responseWrapper, identicalResponseWrapper);
@@ -78,28 +78,28 @@ public class SoResponseWrapperTest {
assertFalse(responseWrapper.equals(null));
assertFalse(responseWrapper.equals("AString"));
- assertEquals(new SOResponseWrapper(null, null), new SOResponseWrapper(null, null));
- assertNotEquals(new SOResponseWrapper(null, null), identicalResponseWrapper);
+ assertEquals(new SoResponseWrapper(null, null), new SoResponseWrapper(null, null));
+ assertNotEquals(new SoResponseWrapper(null, null), identicalResponseWrapper);
- assertNotEquals(0, new SOResponseWrapper(null, null).hashCode());
+ assertNotEquals(0, new SoResponseWrapper(null, null).hashCode());
- identicalResponseWrapper.setSoResponse(new SOResponse());
+ identicalResponseWrapper.setSoResponse(new SoResponse());
assertNotEquals(responseWrapper, identicalResponseWrapper);
identicalResponseWrapper.setSoResponse(response);
assertEquals(responseWrapper, identicalResponseWrapper);
- identicalResponseWrapper.setRequestID(UUID.randomUUID().toString());
+ identicalResponseWrapper.setRequestId(UUID.randomUUID().toString());
assertNotEquals(responseWrapper, identicalResponseWrapper);
- identicalResponseWrapper.setRequestID(requestId);
+ identicalResponseWrapper.setRequestId(requestId);
assertEquals(responseWrapper, identicalResponseWrapper);
- responseWrapper.setRequestID(null);
+ responseWrapper.setRequestId(null);
assertNotEquals(responseWrapper, identicalResponseWrapper);
- identicalResponseWrapper.setRequestID(null);
+ identicalResponseWrapper.setRequestId(null);
assertEquals(responseWrapper, identicalResponseWrapper);
- responseWrapper.setRequestID(requestId);
+ responseWrapper.setRequestId(requestId);
assertNotEquals(responseWrapper, identicalResponseWrapper);
- identicalResponseWrapper.setRequestID(requestId);
+ identicalResponseWrapper.setRequestId(requestId);
assertEquals(responseWrapper, identicalResponseWrapper);
}
}
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoServiceExceptionHolderTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoServiceExceptionHolderTest.java
index b0ce56652..8c9d3a730 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoServiceExceptionHolderTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoServiceExceptionHolderTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@ public class SoServiceExceptionHolderTest {
@Test
public void testConstructor() {
- SOServiceExceptionHolder obj = new SOServiceExceptionHolder();
+ SoServiceExceptionHolder obj = new SoServiceExceptionHolder();
assertTrue(obj.getMessageId() == null);
assertTrue(obj.getText() == null);
@@ -39,7 +40,7 @@ public class SoServiceExceptionHolderTest {
@Test
public void testSetGet() {
- SOServiceExceptionHolder obj = new SOServiceExceptionHolder();
+ SoServiceExceptionHolder obj = new SoServiceExceptionHolder();
obj.setMessageId("messageId");
assertEquals("messageId", obj.getMessageId());
diff --git a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoSubscriberInfoTest.java b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoSubscriberInfoTest.java
index ea38bd597..e68e74e3f 100755
--- a/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoSubscriberInfoTest.java
+++ b/controlloop/common/model-impl/so/src/test/java/org/onap/policy/so/SoSubscriberInfoTest.java
@@ -3,6 +3,7 @@
* so
* ================================================================================
*
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@ public class SoSubscriberInfoTest {
@Test
public void testConstructor() {
- SOSubscriberInfo obj = new SOSubscriberInfo();
+ SoSubscriberInfo obj = new SoSubscriberInfo();
assertTrue(obj.getGlobalSubscriberId() == null);
assertTrue(obj.getSubscriberCommonSiteId() == null);
@@ -38,7 +39,7 @@ public class SoSubscriberInfoTest {
@Test
public void testSetGet() {
- SOSubscriberInfo obj = new SOSubscriberInfo();
+ SoSubscriberInfo obj = new SoSubscriberInfo();
obj.setGlobalSubscriberId("globalSubscriberId");
assertEquals("globalSubscriberId", obj.getGlobalSubscriberId());