aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/vfc/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-01-10 09:57:51 -0500
committerJim Hahn <jrh3@att.com>2019-01-10 11:12:49 -0500
commit485559b57a49a449c6fc3baeda1b0ffd8b05cf6b (patch)
tree22dfb08b040c8485f589c59d9260597f773616ab /controlloop/common/model-impl/vfc/src/test
parentbdc051bb70262daca12cd0c2e5fcc6bcf795996c (diff)
Remove model-impl/vfc checkstyle suppressions
Entails renaming VFCxxx classes and updated drl files, as well. Change-Id: Ib31c61a35536df22772de6090761b22beb1b561b Issue-ID: POLICY-1145 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/model-impl/vfc/src/test')
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java20
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java4
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java6
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java6
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcManagerTest.java46
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java10
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java6
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java6
8 files changed, 52 insertions, 52 deletions
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java
index dae87b6a6..d334d232f 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/DemoTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2017 Intel Corp. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.
@@ -28,30 +28,30 @@ public class DemoTest {
@Test
public void test() {
- VFCRequest request = new VFCRequest();
+ VfcRequest request = new VfcRequest();
- request.setNSInstanceId("100");
- request.setHealRequest(new VFCHealRequest());
+ request.setNsInstanceId("100");
+ request.setHealRequest(new VfcHealRequest());
request.getHealRequest().setVnfInstanceId("1");
request.getHealRequest().setCause("vm is down");
- request.getHealRequest().setAdditionalParams(new VFCHealAdditionalParams());
+ request.getHealRequest().setAdditionalParams(new VfcHealAdditionalParams());
request.getHealRequest().getAdditionalParams().setAction("restartvm");
- request.getHealRequest().getAdditionalParams().setActionInfo(new VFCHealActionVmInfo());
+ request.getHealRequest().getAdditionalParams().setActionInfo(new VfcHealActionVmInfo());
request.getHealRequest().getAdditionalParams().getActionInfo().setVmid("33");
request.getHealRequest().getAdditionalParams().getActionInfo().setVmname("xgw-smp11");
String body = Serialization.gsonPretty.toJson(request);
System.out.println(body);
- VFCResponse response = new VFCResponse();
+ VfcResponse response = new VfcResponse();
response.setJobId("1");
body = Serialization.gsonPretty.toJson(response);
System.out.println(body);
- response.setResponseDescriptor(new VFCResponseDescriptor());
+ response.setResponseDescriptor(new VfcResponseDescriptor());
response.getResponseDescriptor().setProgress("40");
response.getResponseDescriptor().setStatus("processing");
response.getResponseDescriptor().setStatusDescription("OMC VMs are decommissioned in VIM");
@@ -60,7 +60,7 @@ public class DemoTest {
body = Serialization.gsonPretty.toJson(response);
System.out.println(body);
- VFCResponseDescriptor responseDescriptor = new VFCResponseDescriptor();
+ VfcResponseDescriptor responseDescriptor = new VfcResponseDescriptor();
responseDescriptor.setProgress("20");
responseDescriptor.setStatus("processing");
responseDescriptor.setStatusDescription("OMC VMs are decommissioned in VIM");
@@ -73,7 +73,7 @@ public class DemoTest {
body = Serialization.gsonPretty.toJson(response);
System.out.println(body);
- response = Serialization.gsonPretty.fromJson(body, VFCResponse.class);
+ response = Serialization.gsonPretty.fromJson(body, VfcResponse.class);
body = Serialization.gsonPretty.toJson(response);
System.out.println(body);
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java
index 10964a909..8b5b118d2 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealActionVmInfoTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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 +31,7 @@ public class VfcHealActionVmInfoTest {
@Test
public void testVfcHealActionVmInfo() {
- VFCHealActionVmInfo actionInfo = new VFCHealActionVmInfo();
+ VfcHealActionVmInfo actionInfo = new VfcHealActionVmInfo();
assertNotNull(actionInfo);
assertNotEquals(0, actionInfo.hashCode());
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java
index ca2d844c1..e7cb79fef 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealAdditionalParamsTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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 +31,7 @@ public class VfcHealAdditionalParamsTest {
@Test
public void testVfcHealAdditionalParameters() {
- VFCHealAdditionalParams additionalParams = new VFCHealAdditionalParams();
+ VfcHealAdditionalParams additionalParams = new VfcHealAdditionalParams();
assertNotNull(additionalParams);
assertNotEquals(0, additionalParams.hashCode());
@@ -39,7 +39,7 @@ public class VfcHealAdditionalParamsTest {
additionalParams.setAction(action);
assertEquals(action, additionalParams.getAction());
- VFCHealActionVmInfo actionInfo = new VFCHealActionVmInfo();
+ VfcHealActionVmInfo actionInfo = new VfcHealActionVmInfo();
additionalParams.setActionInfo(actionInfo );
assertEquals(actionInfo, additionalParams.getActionInfo());
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java
index 0a256a59b..b67b9ac07 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcHealRequestTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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 +31,7 @@ public class VfcHealRequestTest {
@Test
public void testVfcHealRequest() {
- VFCHealRequest request = new VFCHealRequest();
+ VfcHealRequest request = new VfcHealRequest();
assertNotNull(request);
assertNotEquals(0, request.hashCode());
@@ -43,7 +43,7 @@ public class VfcHealRequestTest {
request.setCause(cause);
assertEquals(cause, request.getCause());
- VFCHealAdditionalParams additionalParams = new VFCHealAdditionalParams();
+ VfcHealAdditionalParams additionalParams = new VfcHealAdditionalParams();
request.setAdditionalParams(additionalParams);
assertEquals(additionalParams, request.getAdditionalParams());
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcManagerTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcManagerTest.java
index ab8161164..f5d06de36 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcManagerTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcManagerTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson, AT&T. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.
@@ -56,8 +56,8 @@ public class VfcManagerTest {
private Pair<Integer, String> httpResponseBadResponse;
private Pair<Integer, String> httpResponseErr;
- private VFCRequest request;
- private VFCResponse response;
+ private VfcRequest request;
+ private VfcResponse response;
@BeforeClass
public static void beforeTestVfcManager() {
@@ -82,28 +82,28 @@ public class VfcManagerTest {
*/
@Before
public void createRequestAndResponse() {
- VFCHealActionVmInfo actionInfo = new VFCHealActionVmInfo();
+ VfcHealActionVmInfo actionInfo = new VfcHealActionVmInfo();
actionInfo.setVmid("TheWizard");
actionInfo.setVmname("The Wizard of Oz");
- VFCHealAdditionalParams additionalParams = new VFCHealAdditionalParams();
+ VfcHealAdditionalParams additionalParams = new VfcHealAdditionalParams();
additionalParams.setAction("Go Home");
additionalParams.setActionInfo(actionInfo);
- VFCHealRequest healRequest = new VFCHealRequest();
+ VfcHealRequest healRequest = new VfcHealRequest();
healRequest.setAdditionalParams(additionalParams);
healRequest.setCause("WestWitch");
healRequest.setVnfInstanceId("EmeraldCity");
final UUID requestId = UUID.randomUUID();
- request = new VFCRequest();
+ request = new VfcRequest();
request.setHealRequest(healRequest);
- request.setNSInstanceId("Dorothy");
+ request.setNsInstanceId("Dorothy");
request.setRequestId(requestId);
- List<VFCResponseDescriptor> responseHistoryList = new ArrayList<>();;
+ List<VfcResponseDescriptor> responseHistoryList = new ArrayList<>();;
- VFCResponseDescriptor responseDescriptor = new VFCResponseDescriptor();
+ VfcResponseDescriptor responseDescriptor = new VfcResponseDescriptor();
responseDescriptor.setErrorCode("1234");
responseDescriptor.setProgress("Follow The Yellow Brick Road");
responseDescriptor.setResponseHistoryList(responseHistoryList);
@@ -111,7 +111,7 @@ public class VfcManagerTest {
responseDescriptor.setStatus("finished");
responseDescriptor.setStatusDescription("There's no place like home");
- response = new VFCResponse();
+ response = new VfcResponse();
response.setJobId("1234");
response.setRequestId(request.getRequestId().toString());
response.setResponseDescriptor(responseDescriptor);
@@ -130,25 +130,25 @@ public class VfcManagerTest {
@Test
public void testVfcInitiation() {
try {
- new VFCManager(null, null);
+ new VfcManager(null, null);
fail("test should throw an exception here");
}
catch (IllegalArgumentException e) {
- assertEquals("the parameters \"wm\" and \"request\" on the VFCManager constructor may not be null",
+ assertEquals("the parameters \"wm\" and \"request\" on the VfcManager constructor may not be null",
e.getMessage());
}
try {
- new VFCManager(mockedWorkingMemory, null);
+ new VfcManager(mockedWorkingMemory, null);
fail("test should throw an exception here");
}
catch (IllegalArgumentException e) {
- assertEquals("the parameters \"wm\" and \"request\" on the VFCManager constructor may not be null",
+ assertEquals("the parameters \"wm\" and \"request\" on the VfcManager constructor may not be null",
e.getMessage());
}
try {
- new VFCManager(mockedWorkingMemory, request);
+ new VfcManager(mockedWorkingMemory, request);
fail("test should throw an exception here");
}
catch (IllegalArgumentException e) {
@@ -158,14 +158,14 @@ public class VfcManagerTest {
// add url; username & password are not required
PolicyEngine.manager.getEnvironment().put("vfc.url", "http://somewhere.over.the.rainbow");
- new VFCManager(mockedWorkingMemory, request);
+ new VfcManager(mockedWorkingMemory, request);
// url & username, but no password
PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
// url, username, and password
PolicyEngine.manager.getEnvironment().put("vfc.password", "Toto");
- new VFCManager(mockedWorkingMemory, request);
+ new VfcManager(mockedWorkingMemory, request);
}
@Test
@@ -174,7 +174,7 @@ public class VfcManagerTest {
PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
PolicyEngine.manager.getEnvironment().put("vfc.password", "Exception");
- VFCManager manager = new VFCManager(mockedWorkingMemory, request);
+ VfcManager manager = new VfcManager(mockedWorkingMemory, request);
manager.setRestManager(mockedRestManager);
Thread managerThread = new Thread(manager);
@@ -202,7 +202,7 @@ public class VfcManagerTest {
PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
PolicyEngine.manager.getEnvironment().put("vfc.password", "Null");
- VFCManager manager = new VFCManager(mockedWorkingMemory, request);
+ VfcManager manager = new VfcManager(mockedWorkingMemory, request);
manager.setRestManager(mockedRestManager);
Thread managerThread = new Thread(manager);
@@ -225,7 +225,7 @@ public class VfcManagerTest {
PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
PolicyEngine.manager.getEnvironment().put("vfc.password", "Error0");
- VFCManager manager = new VFCManager(mockedWorkingMemory, request);
+ VfcManager manager = new VfcManager(mockedWorkingMemory, request);
manager.setRestManager(mockedRestManager);
Thread managerThread = new Thread(manager);
@@ -248,7 +248,7 @@ public class VfcManagerTest {
PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
PolicyEngine.manager.getEnvironment().put("vfc.password", "BadResponse");
- VFCManager manager = new VFCManager(mockedWorkingMemory, request);
+ VfcManager manager = new VfcManager(mockedWorkingMemory, request);
manager.setRestManager(mockedRestManager);
Thread managerThread = new Thread(manager);
@@ -271,7 +271,7 @@ public class VfcManagerTest {
PolicyEngine.manager.getEnvironment().put("vfc.username", "Dorothy");
PolicyEngine.manager.getEnvironment().put("vfc.password", "OK");
- VFCManager manager = new VFCManager(mockedWorkingMemory, request);
+ VfcManager manager = new VfcManager(mockedWorkingMemory, request);
manager.setRestManager(mockedRestManager);
Thread managerThread = new Thread(manager);
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java
index 95589154f..7dede1b7b 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcRequestTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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,19 +33,19 @@ public class VfcRequestTest {
@Test
public void testVfcRequest() {
- VFCRequest request = new VFCRequest();
+ VfcRequest request = new VfcRequest();
assertNotNull(request);
assertNotEquals(0, request.hashCode());
String nsInstanceId = "Dorothy";
- request.setNSInstanceId(nsInstanceId);
- assertEquals(nsInstanceId, request.getNSInstanceId());
+ request.setNsInstanceId(nsInstanceId);
+ assertEquals(nsInstanceId, request.getNsInstanceId());
UUID requestId = UUID.randomUUID();
request.setRequestId(requestId);
assertEquals(requestId, request.getRequestId());
- VFCHealRequest healRequest = new VFCHealRequest();
+ VfcHealRequest healRequest = new VfcHealRequest();
request.setHealRequest(healRequest);
assertEquals(healRequest, request.getHealRequest());
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java
index 9ab180767..b4dc81b44 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseDescriptorTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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.
@@ -34,7 +34,7 @@ public class VfcResponseDescriptorTest {
@Test
public void testVfcResponseDescriptor() {
- VFCResponseDescriptor descriptor = new VFCResponseDescriptor();
+ VfcResponseDescriptor descriptor = new VfcResponseDescriptor();
assertNotNull(descriptor);
assertNotEquals(0, descriptor.hashCode());
@@ -46,7 +46,7 @@ public class VfcResponseDescriptorTest {
descriptor.setProgress(progress);
assertEquals(progress, descriptor.getProgress());
- List<VFCResponseDescriptor> responseHistoryList = new ArrayList<>();
+ List<VfcResponseDescriptor> responseHistoryList = new ArrayList<>();
descriptor.setResponseHistoryList(responseHistoryList);
assertEquals(responseHistoryList, descriptor.getResponseHistoryList());
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java
index f333c4165..15ba6f520 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/VfcResponseTest.java
@@ -3,7 +3,7 @@
* vfc
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2018 AT&T Corporation. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corporation. 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 +31,7 @@ public class VfcResponseTest {
@Test
public void testVfcResponse() {
- VFCResponse response = new VFCResponse();
+ VfcResponse response = new VfcResponse();
assertNotNull(response);
assertNotEquals(0, response.hashCode());
@@ -43,7 +43,7 @@ public class VfcResponseTest {
response.setRequestId(requestId);
assertEquals(requestId, response.getRequestId());
- VFCResponseDescriptor responseDescriptor = new VFCResponseDescriptor();
+ VfcResponseDescriptor responseDescriptor = new VfcResponseDescriptor();
response.setResponseDescriptor(responseDescriptor);
assertEquals(responseDescriptor, response.getResponseDescriptor());