summaryrefslogtreecommitdiffstats
path: root/model/event-model
diff options
context:
space:
mode:
authorwaynedunican <wayne.dunican@est.tech>2020-08-14 11:24:14 +0100
committerwaynedunican <wayne.dunican@est.tech>2020-08-17 14:13:13 +0100
commita73217b479a500fb9420dbcb453a134ec8d1eee7 (patch)
tree4f5055eb69f4df57015090cb2498e6045b8874ee /model/event-model
parent1798f96670cc2d182628332ffec5e012816c82ea (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/event-model')
-rw-r--r--model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java2
-rw-r--r--model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java4
-rw-r--r--model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java2
3 files changed, 4 insertions, 4 deletions
diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java
index 1731bcddc..cdc5fecf6 100644
--- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java
+++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java
@@ -61,7 +61,7 @@ public class EventModelTest {
// 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 AxEventModel(new AxArtifactKey()));
assertNotEquals(model, new AxEventModel(modelKey, new AxContextSchemas(), new AxKeyInformation(keyInfoKey),
new AxEvents(eventsKey)));
diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java
index a2d562a6f..21601d770 100644
--- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java
+++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java
@@ -191,7 +191,7 @@ public class EventsTest {
assertEquals(event, event); // NOSONAR
assertEquals(event, clonedEvent);
assertNotNull(event);
- assertNotEquals(event, "Hello");
+ assertNotEquals(event, (Object) "Hello");
assertNotEquals(
event, new AxEvent(AxArtifactKey.getNullKey(), "namespace", "source", "target", parameterMap));
assertNotEquals(event, new AxEvent(eventKey, "namespace1", "source", "target", parameterMap));
@@ -273,7 +273,7 @@ public class EventsTest {
assertEquals(events, clonedEvents);
assertNotNull(events);
- assertNotEquals(events, "Hello");
+ assertNotEquals(events, (Object) "Hello");
assertNotEquals(events, new AxEvents(new AxArtifactKey()));
assertEquals(0, events.compareTo(events));
diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java
index dd76d329c..6ec46dbd5 100644
--- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java
+++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java
@@ -113,7 +113,7 @@ public class FieldTest {
assertEquals(field, field); // NOSONAR
assertEquals(field, clonedField);
assertNotNull(field);
- assertNotEquals(field, "Hello");
+ assertNotEquals(field, (Object) "Hello");
assertNotEquals(field, new AxField(AxReferenceKey.getNullKey(), AxArtifactKey.getNullKey(), false));
assertNotEquals(field, new AxField(fieldKey, AxArtifactKey.getNullKey(), false));
assertNotEquals(field, new AxField(fieldKey, schemaKey, false));