summaryrefslogtreecommitdiffstats
path: root/controlloop/m2/appclcm/src/test/java
diff options
context:
space:
mode:
authorRam Krishna Verma <ram_krishna.verma@bell.ca>2020-06-10 22:16:59 +0000
committerGerrit Code Review <gerrit@onap.org>2020-06-10 22:16:59 +0000
commit2329adea777be01ae067c3446fda61900c8e8fab (patch)
treeb35d984cd258fc845878ec76b16eea17e6d15fa6 /controlloop/m2/appclcm/src/test/java
parent6d11b115301763cc66d011f00236ccedd68ba820 (diff)
parent80a2a2db9a9fab360d14eb1ed62bcc8558f64538 (diff)
Merge "sonar issue drools-application - 2"
Diffstat (limited to 'controlloop/m2/appclcm/src/test/java')
-rw-r--r--controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java16
-rw-r--r--controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java12
2 files changed, 14 insertions, 14 deletions
diff --git a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java
index 25f8043f2..f49204e65 100644
--- a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java
+++ b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmHealthCheckOperationTest.java
@@ -158,7 +158,7 @@ public class AppcLcmHealthCheckOperationTest {
AppcLcmDmaapWrapper healthCheckResp = Serialization.gson.fromJson(lcmRespJson, AppcLcmDmaapWrapper.class);
operation.incomingMessage(healthCheckResp);
- assertEquals(operation.getResult(), PolicyResult.SUCCESS);
+ assertEquals(PolicyResult.SUCCESS, operation.getResult());
}
@Test
@@ -179,7 +179,7 @@ public class AppcLcmHealthCheckOperationTest {
AppcLcmDmaapWrapper healthCheckResp = Serialization.gson.fromJson(lcmRespJson, AppcLcmDmaapWrapper.class);
operation.incomingMessage(healthCheckResp);
- assertEquals(operation.getResult(), PolicyResult.FAILURE);
+ assertEquals(PolicyResult.FAILURE, operation.getResult());
}
@Test
@@ -200,7 +200,7 @@ public class AppcLcmHealthCheckOperationTest {
AppcLcmDmaapWrapper healthCheckResp = Serialization.gson.fromJson(lcmRespJson, AppcLcmDmaapWrapper.class);
operation.incomingMessage(healthCheckResp);
- assertEquals(operation.getResult(), PolicyResult.FAILURE_EXCEPTION);
+ assertEquals(PolicyResult.FAILURE_EXCEPTION, operation.getResult());
}
@Test
@@ -221,7 +221,7 @@ public class AppcLcmHealthCheckOperationTest {
AppcLcmDmaapWrapper healthCheckResp = Serialization.gson.fromJson(lcmRespJson, AppcLcmDmaapWrapper.class);
operation.incomingMessage(healthCheckResp);
- assertEquals(operation.getResult(), PolicyResult.FAILURE_EXCEPTION);
+ assertEquals(PolicyResult.FAILURE_EXCEPTION, operation.getResult());
}
@Test
@@ -242,7 +242,7 @@ public class AppcLcmHealthCheckOperationTest {
AppcLcmDmaapWrapper healthCheckResp = Serialization.gson.fromJson(lcmRespJson, AppcLcmDmaapWrapper.class);
operation.incomingMessage(healthCheckResp);
- assertEquals(operation.getResult(), PolicyResult.FAILURE);
+ assertEquals(PolicyResult.FAILURE, operation.getResult());
}
@Test
@@ -260,7 +260,7 @@ public class AppcLcmHealthCheckOperationTest {
AppcLcmDmaapWrapper healthCheckResp = Serialization.gson.fromJson(lcmRespJson, AppcLcmDmaapWrapper.class);
operation.incomingMessage(healthCheckResp);
- assertEquals(operation.getResult(), PolicyResult.FAILURE_EXCEPTION);
+ assertEquals(PolicyResult.FAILURE_EXCEPTION, operation.getResult());
}
@Test
@@ -278,7 +278,7 @@ public class AppcLcmHealthCheckOperationTest {
AppcLcmDmaapWrapper healthCheckResp = Serialization.gson.fromJson(lcmRespJson, AppcLcmDmaapWrapper.class);
operation.incomingMessage(healthCheckResp);
- assertEquals(operation.getResult(), PolicyResult.FAILURE_EXCEPTION);
+ assertEquals(PolicyResult.FAILURE_EXCEPTION, operation.getResult());
}
@Test
@@ -331,4 +331,4 @@ public class AppcLcmHealthCheckOperationTest {
operation.incomingMessage(healthCheckResp);
assertEquals(null, operation.getResult());
}
-} \ No newline at end of file
+}
diff --git a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java
index 5bd65eb74..cd28ab408 100644
--- a/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java
+++ b/controlloop/m2/appclcm/src/test/java/appclcm/AppcLcmOperationTest.java
@@ -164,7 +164,7 @@ public class AppcLcmOperationTest {
assertEquals("Restart", appcRequest.getAction());
assertNotNull(appcRequest.getActionIdentifiers());
assertEquals(event.getAai().get("generic-vnf.vnf-id"), appcRequest.getActionIdentifiers().get("vnf-id"));
- assertEquals(appcRequest.getActionIdentifiers().get("vserver-id"), null);
+ assertNull(appcRequest.getActionIdentifiers().get("vserver-id"));
assertNull(appcRequest.getPayload());
logger.info("vnf restart request: {}", Serialization.gson.toJson(request, AppcLcmDmaapWrapper.class));
@@ -224,7 +224,7 @@ public class AppcLcmOperationTest {
assertEquals("Rebuild", appcRequest.getAction());
assertNotNull(appcRequest.getActionIdentifiers());
assertEquals(event.getAai().get("generic-vnf.vnf-id"), appcRequest.getActionIdentifiers().get("vnf-id"));
- assertEquals(appcRequest.getActionIdentifiers().get("vserver-id"), null);
+ assertNull(appcRequest.getActionIdentifiers().get("vserver-id"));
assertNull(appcRequest.getPayload());
logger.info("vnf rebuild request: {}", Serialization.gson.toJson(request, AppcLcmDmaapWrapper.class));
@@ -284,7 +284,7 @@ public class AppcLcmOperationTest {
assertEquals("Migrate", appcRequest.getAction());
assertNotNull(appcRequest.getActionIdentifiers());
assertEquals(event.getAai().get("generic-vnf.vnf-id"), appcRequest.getActionIdentifiers().get("vnf-id"));
- assertEquals(appcRequest.getActionIdentifiers().get("vserver-id"), null);
+ assertNull(appcRequest.getActionIdentifiers().get("vserver-id"));
assertNull(appcRequest.getPayload());
logger.info("vnf migrate request: {}", Serialization.gson.toJson(request, AppcLcmDmaapWrapper.class));
@@ -344,7 +344,7 @@ public class AppcLcmOperationTest {
assertEquals("Evacuate", appcRequest.getAction());
assertNotNull(appcRequest.getActionIdentifiers());
assertEquals(event.getAai().get("generic-vnf.vnf-id"), appcRequest.getActionIdentifiers().get("vnf-id"));
- assertEquals(appcRequest.getActionIdentifiers().get("vserver-id"), null);
+ assertNull(appcRequest.getActionIdentifiers().get("vserver-id"));
assertNull(appcRequest.getPayload());
logger.info("vnf evacuate request: {}", Serialization.gson.toJson(request, AppcLcmDmaapWrapper.class));
@@ -408,7 +408,7 @@ public class AppcLcmOperationTest {
assertEquals("Reboot", appcRequest.getAction());
assertNotNull(appcRequest.getActionIdentifiers());
assertEquals(event.getAai().get("generic-vnf.vnf-id"), appcRequest.getActionIdentifiers().get("vnf-id"));
- assertEquals(appcRequest.getActionIdentifiers().get("vserver-id"), null);
+ assertNull(appcRequest.getActionIdentifiers().get("vserver-id"));
assertNotNull(appcRequest.getPayload());
logger.info("vnf reboot request: {}", Serialization.gson.toJson(request, AppcLcmDmaapWrapper.class));
@@ -724,4 +724,4 @@ public class AppcLcmOperationTest {
operation.incomingMessage(validEvent);
assertEquals(PolicyResult.SUCCESS, operation.getResult());
}
-} \ No newline at end of file
+}