diff options
Diffstat (limited to 'model/engine-model')
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); |