summaryrefslogtreecommitdiffstats
path: root/model/engine-model/src/test
diff options
context:
space:
mode:
authorwaynedunican <wayne.dunican@est.tech>2020-08-07 09:51:52 +0100
committerwaynedunican <wayne.dunican@est.tech>2020-08-10 11:34:03 +0100
commit09212e0d7326c2933ed437ee36188a241b8cf900 (patch)
tree03f33a3a95ab0aa086c38e22c1fd0ffdb715fa94 /model/engine-model/src/test
parenta926cdc113b5fad19a34dbf45e66bd7cbb5ed6e0 (diff)
SONAR assertion cleanup
Replaced assertions to not have the same actual and expected expression in apex-pdp Issue-ID: POLICY-2761 Change-Id: I2bf45a3cc4411bd39f93f9d0b8c8e56dd318281e Signed-off-by: waynedunican <wayne.dunican@est.tech>
Diffstat (limited to 'model/engine-model/src/test')
-rw-r--r--model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java5
-rw-r--r--model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java3
2 files changed, 5 insertions, 3 deletions
diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java
index f3f2fb602..9d1c7bf44 100644
--- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java
+++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java
@@ -98,9 +98,10 @@ public class EngineModelTest {
assertNotEquals(0, model.hashCode());
- assertEquals(model, model);
+ // disabling sonar because this code tests the equals() method
+ assertEquals(model, model); // NOSONAR
assertEquals(model, clonedModel);
- assertNotEquals(model, (Object) "Hello");
+ assertNotEquals(model, "Hello");
assertNotEquals(model, new AxEngineModel(new AxArtifactKey()));
assertNotEquals(model, new AxEngineModel(new AxArtifactKey(), new AxContextSchemas(schemasKey),
new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.READY, stats));
diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java
index 5cb1bd40e..7669f67bd 100644
--- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java
+++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java
@@ -134,7 +134,8 @@ public class EngineStatsTest {
assertNotEquals(0, stats.hashCode());
- assertEquals(stats, stats);
+ // disabling sonar because this code tests the equals() method
+ assertEquals(stats, stats); // NOSONAR
assertEquals(stats, clonedStats);
assertNotNull(stats);