summaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/test
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-08-29 07:58:53 -0400
committerPamela Dragosh <pdragosh@research.att.com>2018-08-29 12:34:55 -0400
commit8279af376b435e1d7dd118a1955c5681edf3b847 (patch)
treef0e9f24028b8e96908184192f9e2813a2981938a /controlloop/common/eventmanager/src/test
parent17435998307f9f86ec5ebe55d6d36eceee1f1943 (diff)
Fix remaining checkstyle
Lots of formatting, missing javadoc, distance from use, imports must be explicit, ordering of methods. Fixed some abbreviation problems in classes and renamed JUnit tests to fix this. Issue-ID: POLICY-883 Change-Id: I8494f63d88d63c0232aca97f7bcc848816228fb1 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/common/eventmanager/src/test')
-rw-r--r--controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java18
-rw-r--r--controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java4
2 files changed, 13 insertions, 9 deletions
diff --git a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java
index 1b2d8db61..562a46e4e 100644
--- a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java
+++ b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java
@@ -26,6 +26,7 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
@@ -44,9 +45,9 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.onap.policy.aai.AaiGetVnfResponse;
import org.onap.policy.aai.AaiGetVserverResponse;
-import org.onap.policy.aai.AaiNqVServer;
import org.onap.policy.aai.AaiNqRequestError;
import org.onap.policy.aai.AaiNqResponseWrapper;
+import org.onap.policy.aai.AaiNqVServer;
import org.onap.policy.aai.RelatedToProperty;
import org.onap.policy.aai.Relationship;
import org.onap.policy.aai.RelationshipData;
@@ -101,6 +102,9 @@ public class ControlLoopEventManagerTest {
HttpServletServer.factory.destroy();
}
+ /**
+ * Setup.
+ */
@Before
public void setUp() {
onset = new VirtualControlLoopEvent();
@@ -368,7 +372,7 @@ public class ControlLoopEventManagerTest {
*/
public static AaiGetVserverResponse getQueryByVserverName2(String urlGet, String username, String password,
UUID requestId, String key) {
- AaiGetVserverResponse response = new AaiGetVserverResponse();
+ final AaiGetVserverResponse response = new AaiGetVserverResponse();
AaiNqVServer svr = new AaiNqVServer();
@@ -1049,7 +1053,7 @@ public class ControlLoopEventManagerTest {
}
@Test
- public void testProcessVNFResponse_Success() throws Exception {
+ public void testProcessVnfResponse_Success() throws Exception {
AaiGetVnfResponse resp = new AaiGetVnfResponse();
resp.setIsClosedLoopDisabled(false);
resp.setProvStatus(ControlLoopEventManager.PROV_STATUS_ACTIVE);
@@ -1057,7 +1061,7 @@ public class ControlLoopEventManagerTest {
}
@Test
- public void testProcessVNFResponse_NullResponse() throws Exception {
+ public void testProcessVnfResponse_NullResponse() throws Exception {
thrown.expect(AaiException.class);
thrown.expectMessage("AAI Response is null (query by vnf-id)");
@@ -1066,7 +1070,7 @@ public class ControlLoopEventManagerTest {
}
@Test
- public void testProcessVNFResponse_Error() throws Exception {
+ public void testProcessVnfResponse_Error() throws Exception {
thrown.expect(AaiException.class);
thrown.expectMessage("AAI Responded with a request error (query by vnf-name)");
@@ -1080,7 +1084,7 @@ public class ControlLoopEventManagerTest {
}
@Test
- public void testProcessVNFResponse_Disabled() throws Exception {
+ public void testProcessVnfResponse_Disabled() throws Exception {
thrown.expect(AaiException.class);
thrown.expectMessage("is-closed-loop-disabled is set to true (query by vnf-id)");
@@ -1091,7 +1095,7 @@ public class ControlLoopEventManagerTest {
}
@Test
- public void testProcessVNFResponse_Inactive() throws Exception {
+ public void testProcessVnfResponse_Inactive() throws Exception {
thrown.expect(AaiException.class);
thrown.expectMessage("prov-status is not ACTIVE (query by vnf-name)");
diff --git a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java
index cd541cf66..46452974e 100644
--- a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java
+++ b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManagerTest.java
@@ -454,10 +454,10 @@ public class ControlLoopOperationManagerTest {
clom.startOperation(onsetEvent);
- assertEquals("actor=SO,operation=Restart,target=Target [type=VFC, resourceID=null],subRequestId=1",
+ assertEquals("actor=SO,operation=Restart,target=Target [type=VFC, resourceId=null],subRequestId=1",
clom.getOperationMessage());
assertEquals(
- "actor=SO,operation=Restart,target=Target [type=VFC, resourceID=null],subRequestId=1, Guard result: "
+ "actor=SO,operation=Restart,target=Target [type=VFC, resourceId=null],subRequestId=1, Guard result: "
+ "The Wizard Escaped",
clom.getOperationMessage("The Wizard Escaped"));