aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorSuresh Charan <suresh.charan@bell.ca>2023-02-24 14:47:02 -0500
committerSuresh Charan <suresh.charan@bell.ca>2023-02-24 14:47:22 -0500
commitacfc48f09d52f9559f2d49591e82ff0eada21aa7 (patch)
treeb3817a68b33fa10fb9e1eaa53e3a71f149748523 /main
parent3c713852f07da4fcd19f883b4d346b5ae79539f6 (diff)
Fixed sonar issues in xacml-pdp
Reduced technical debt Issue-ID: POLICY-4536 Change-Id: I2d345cc879dbd267b4a2c0791aae153db994114b Signed-off-by: Suresh Charan <suresh.charan@bell.ca>
Diffstat (limited to 'main')
-rw-r--r--main/src/test/java/org/onap/policy/pdpx/main/XacmlStateTest.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/main/src/test/java/org/onap/policy/pdpx/main/XacmlStateTest.java b/main/src/test/java/org/onap/policy/pdpx/main/XacmlStateTest.java
index d8dc2ee3..a1f1b8a7 100644
--- a/main/src/test/java/org/onap/policy/pdpx/main/XacmlStateTest.java
+++ b/main/src/test/java/org/onap/policy/pdpx/main/XacmlStateTest.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2019, 2021-2022 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Nordix Foundation.
+ * Modifications Copyright (C) 2023 Bell Canada.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -133,14 +134,14 @@ public class XacmlStateTest {
publisher.handlePdpUpdate(message);
PdpStatistics stats = state.getStatistics();
- assertTrue(stats != null);
+ assertNotNull(stats);
assertEquals(GROUP, stats.getPdpGroupName());
- assertEquals(stats.getPolicyDeployCount(), 1);
- assertEquals(stats.getPolicyDeploySuccessCount(), 1);
- assertEquals(stats.getPolicyDeployFailCount(), 0);
- assertEquals(stats.getPolicyUndeployCount(), 1);
- assertEquals(stats.getPolicyUndeployFailCount(), 1);
- assertEquals(stats.getPolicyUndeploySuccessCount(), 0);
+ assertEquals(1, stats.getPolicyDeployCount());
+ assertEquals(1, stats.getPolicyDeploySuccessCount());
+ assertEquals(0, stats.getPolicyDeployFailCount());
+ assertEquals(1, stats.getPolicyUndeployCount());
+ assertEquals(1, stats.getPolicyUndeployFailCount());
+ assertEquals(0, stats.getPolicyUndeploySuccessCount());
PdpStatistics test = new PdpStatistics();
test.setTimeStamp(stats.getTimeStamp());