summaryrefslogtreecommitdiffstats
path: root/model/event-model/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'model/event-model/src/test')
-rw-r--r--model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java6
-rw-r--r--model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java8
-rw-r--r--model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java6
3 files changed, 10 insertions, 10 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 c86ba12e7..1731bcddc 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
@@ -58,10 +58,10 @@ public class EventModelTest {
final AxEventModel clonedModel = new AxEventModel(model);
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 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 629df1a5f..a2d562a6f 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
@@ -187,10 +187,11 @@ public class EventsTest {
assertNotEquals(0, event.hashCode());
- assertEquals(event, event);
+ // disabling sonar because this code tests the equals() method
+ assertEquals(event, event); // NOSONAR
assertEquals(event, clonedEvent);
assertNotNull(event);
- assertNotEquals(event, (Object) "Hello");
+ assertNotEquals(event, "Hello");
assertNotEquals(
event, new AxEvent(AxArtifactKey.getNullKey(), "namespace", "source", "target", parameterMap));
assertNotEquals(event, new AxEvent(eventKey, "namespace1", "source", "target", parameterMap));
@@ -270,10 +271,9 @@ public class EventsTest {
assertNotEquals(0, events.hashCode());
- assertEquals(events, events);
assertEquals(events, clonedEvents);
assertNotNull(events);
- assertNotEquals(events, (Object) "Hello");
+ assertNotEquals(events, "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 e5a01ed6f..dd76d329c 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
@@ -109,11 +109,11 @@ public class FieldTest {
+ "AxArtifactKey:(name=SchemaName,version=0.0.1),optional=true)", clonedField.toString());
assertNotEquals(0, field.hashCode());
-
- assertEquals(field, field);
+ // disabling sonar because this code tests the equals() method
+ assertEquals(field, field); // NOSONAR
assertEquals(field, clonedField);
assertNotNull(field);
- assertNotEquals(field, (Object) "Hello");
+ assertNotEquals(field, "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));