summaryrefslogtreecommitdiffstats
path: root/controlloop/templates/template.demo/src/test
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-10-09 12:36:01 -0400
committerPamela Dragosh <pdragosh@research.att.com>2018-10-09 12:38:27 -0400
commitecffd0e5dfe112bcc69ee420848bbc476571637c (patch)
tree23dd9fc91a11b616e040c59e3a89d49217108a9b /controlloop/templates/template.demo/src/test
parent826740182adcc57cc25af9705eb96d04e0059fd0 (diff)
Add missing SDNC and fix JUnit1.3.0
Identified in prior review, ensure all the new actors are in the appropriate pom.xml and minor fix to JUnit for assertEquals vs assertTrue. Issue-ID: POLICY-1191 Change-Id: I5c7505ad795e6e19c99a3aa9cec7ecf688da8316 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/templates/template.demo/src/test')
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java
index 37f55dc09..06e2aca9b 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VpciControlLoopTest.java
@@ -3,6 +3,7 @@
* demo
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2018 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.
@@ -293,17 +294,17 @@ public class VpciControlLoopTest implements TopicListener {
String policyName = notification.getPolicyName();
logger.debug("Rule Fired: {}", policyName);
if (policyName.endsWith("EVENT")) {
- assertTrue(ControlLoopNotificationType.ACTIVE.equals(notification.getNotification()));
+ assertEquals(ControlLoopNotificationType.ACTIVE, notification.getNotification());
} else if (policyName.endsWith("GUARD_NOT_YET_QUERIED")) {
- assertTrue(ControlLoopNotificationType.OPERATION.equals(notification.getNotification()));
+ assertEquals(ControlLoopNotificationType.OPERATION, notification.getNotification());
assertNotNull(notification.getMessage());
assertTrue(notification.getMessage().startsWith("Sending guard query"));
} else if (policyName.endsWith("GUARD.RESPONSE")) {
- assertTrue(ControlLoopNotificationType.OPERATION.equals(notification.getNotification()));
+ assertEquals(ControlLoopNotificationType.OPERATION, notification.getNotification());
assertNotNull(notification.getMessage());
assertTrue(notification.getMessage().toLowerCase().endsWith("permit"));
} else if (policyName.endsWith("GUARD_PERMITTED")) {
- assertTrue(ControlLoopNotificationType.OPERATION.equals(notification.getNotification()));
+ assertEquals(ControlLoopNotificationType.OPERATION, notification.getNotification());
assertNotNull(notification.getMessage());
assertTrue(notification.getMessage().startsWith("actor=SDNR"));
} else if (policyName.endsWith("OPERATION.TIMEOUT")) {
@@ -311,7 +312,7 @@ public class VpciControlLoopTest implements TopicListener {
logger.debug("The operation timed out");
fail("Operation Timed Out");
} else if (policyName.endsWith("SDNR.RESPONSE")) {
- assertTrue(ControlLoopNotificationType.OPERATION_SUCCESS.equals(notification.getNotification()));
+ assertEquals(ControlLoopNotificationType.OPERATION_SUCCESS, notification.getNotification());
assertNotNull(notification.getMessage());
assertTrue(notification.getMessage().startsWith("actor=SDNR"));
} else if (policyName.endsWith("EVENT.MANAGER")) {
@@ -334,7 +335,7 @@ public class VpciControlLoopTest implements TopicListener {
*/
PciRequestWrapper dmaapRequest = (PciRequestWrapper) obj;
PciRequest pciRequest = dmaapRequest.getBody();
- assertTrue(pciRequest.getCommonHeader().getSubRequestId().equals("1"));
+ assertEquals("1", pciRequest.getCommonHeader().getSubRequestId());
logger.debug("\n============ SDNR received the request!!! ===========\n");
logger.debug("\n============ dmaapRequest ===========\n {} ", dmaapRequest);