diff options
author | waynedunican <wayne.dunican@est.tech> | 2020-08-14 11:24:14 +0100 |
---|---|---|
committer | waynedunican <wayne.dunican@est.tech> | 2020-08-17 14:13:13 +0100 |
commit | a73217b479a500fb9420dbcb453a134ec8d1eee7 (patch) | |
tree | 4f5055eb69f4df57015090cb2498e6045b8874ee /model/context-model/src/test | |
parent | 1798f96670cc2d182628332ffec5e012816c82ea (diff) |
SONAR fixes - assert dissimiliar types
Fix for assertions comparing dissimiliar types.
Issue-ID: POLICY-2761
Change-Id: I1b2b8afa3e6308cda887d73a4ee079709847d054
Signed-off-by: waynedunican <wayne.dunican@est.tech>
Diffstat (limited to 'model/context-model/src/test')
3 files changed, 5 insertions, 5 deletions
diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java index 2e2005fcd..154739b90 100644 --- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java +++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java @@ -119,7 +119,7 @@ public class ContextAlbumsTest { assertEquals(album, album); // NOSONAR assertEquals(album, clonedAlbum); assertNotNull(album); - assertNotEquals(album, "Hello"); + assertNotEquals(album, (Object) "Hello"); assertNotEquals(album, new AxContextAlbum(new AxArtifactKey(), "Scope", false, AxArtifactKey.getNullKey())); assertNotEquals(album, new AxContextAlbum(newKey, "Scope", false, AxArtifactKey.getNullKey())); assertNotEquals(album, new AxContextAlbum(newKey, "NewAlbumScope", false, AxArtifactKey.getNullKey())); @@ -185,7 +185,7 @@ public class ContextAlbumsTest { assertEquals(albums, clonedAlbums); assertNotNull(albums); - assertNotEquals(albums, "Hello"); + assertNotEquals(albums, (Object) "Hello"); assertNotEquals(albums, new AxContextAlbums(new AxArtifactKey())); assertEquals(0, albums.compareTo(albums)); diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java index ae6de38f2..eab561e25 100644 --- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java +++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java @@ -63,7 +63,7 @@ public class ContextModelTest { // disabling sonar because this code tests the equals() method assertEquals(model, model); // NOSONAR assertEquals(model, clonedModel); - assertNotEquals(model, "Hello"); + assertNotEquals(model, (Object) "Hello"); assertNotEquals(model, new AxContextModel(new AxArtifactKey())); assertNotEquals(model, new AxContextModel(new AxArtifactKey(), new AxContextSchemas(), new AxContextAlbums(), new AxKeyInformation())); diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java index 55844d9d9..6de0a5214 100644 --- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java +++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java @@ -107,7 +107,7 @@ public class ContextSchemasTest { assertEquals(schema, schema); // NOSONAR assertEquals(schema, clonedSchema); assertNotNull(schema); - assertNotEquals(schema, "Hello"); + assertNotEquals(schema, (Object) "Hello"); assertNotEquals(schema, new AxContextSchema(new AxArtifactKey(), "Flavour", "Def")); assertNotEquals(schema, new AxContextSchema(newKey, "Flavour", "Def")); assertNotEquals(schema, new AxContextSchema(newKey, "NewSchemaFlavour", "Def")); @@ -168,7 +168,7 @@ public class ContextSchemasTest { assertEquals(schemas, clonedSchemas); assertNotNull(schemas); - assertNotEquals(schemas, "Hello"); + assertNotEquals(schemas, (Object) "Hello"); assertNotEquals(schemas, new AxContextSchemas(new AxArtifactKey())); assertEquals(0, schemas.compareTo(schemas)); |