summaryrefslogtreecommitdiffstats
path: root/core/core-protocols
diff options
context:
space:
mode:
Diffstat (limited to 'core/core-protocols')
-rw-r--r--core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java3
-rw-r--r--core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponseTest.java6
-rw-r--r--core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java6
-rw-r--r--core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java5
4 files changed, 11 insertions, 9 deletions
diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java
index 925884534..db13069f1 100644
--- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java
+++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java
@@ -64,7 +64,8 @@ public class SupportMessageTester {
dummyMessage = new DummyMessage(null, null, null);
assertEquals(0, dummyMessage.hashCode());
- assertEquals(dummyMessage, dummyMessage);
+ // disabling sonar because this code tests the equals() method
+ assertEquals(dummyMessage, dummyMessage); // NOSONAR
assertNotNull(dummyMessage);
assertNotEquals(dummyMessage, new StartEngine(new AxArtifactKey()));
diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponseTest.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponseTest.java
index 87fe44aae..6e588dbe3 100644
--- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponseTest.java
+++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponseTest.java
@@ -71,10 +71,10 @@ public class EngineServiceInfoResponseTest {
response.setEngineKeyArray(engineKeyArrayList);
assertNotEquals(0, response.hashCode());
response.setEngineKeyArray(null);
-
- assertEquals(response, response);
+ // disabling sonar because this code tests the equals() method
+ assertEquals(response, response); // NOSONAR
assertNotNull(response);
- assertNotEquals(response, (Object) new StartEngine(new AxArtifactKey()));
+ assertNotEquals(response, new StartEngine(new AxArtifactKey()));
response = new EngineServiceInfoResponse(null, false, null);
EngineServiceInfoResponse otherResponse = new EngineServiceInfoResponse(null, false, null);
diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java
index b28993a41..35fe5bb9f 100644
--- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java
+++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java
@@ -53,7 +53,7 @@ public class ResponseTest {
final AxArtifactKey responseKey = new AxArtifactKey("ResponseTest", "0.0.1");
final AxArtifactKey responseToKey = new AxArtifactKey("ResponseTestTo", "0.0.1");
UpdateModel responseTo = new UpdateModel(responseToKey);
-
+
Response message = new Response(responseKey, false, responseTo);
logger.debug(message.toString());
assertTrue(message.toString().contains("ResponseTest"));
@@ -73,8 +73,8 @@ public class ResponseTest {
assertNotEquals(0, message.hashCode());
message = new Response(responseKey, true, new UpdateModel(null));
assertNotEquals(0, message.hashCode());
-
- assertEquals(message, message);
+ // disabling sonar because this code tests the equals() method
+ assertEquals(message, message); // NOSONAR
assertNotNull(message);
assertNotEquals(message, new StartEngine(new AxArtifactKey()));
diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java
index 0839a43b8..13d37a8f6 100644
--- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java
+++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -68,8 +69,8 @@ public class UpdateModelTest {
assertNotEquals(0, message.hashCode());
message = new UpdateModel(null, null, false, true);
assertNotEquals(0, message.hashCode());
-
- assertEquals(message, message);
+ // disabling sonar because this code tests the equals() method
+ assertEquals(message, message); // NOSONAR
assertNotNull(message);
assertNotEquals(message, new StartEngine(new AxArtifactKey()));