aboutsummaryrefslogtreecommitdiffstats
path: root/model/basic-model/src
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/basic-model/src
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/basic-model/src')
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java2
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java2
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java2
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java2
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java4
5 files changed, 6 insertions, 6 deletions
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java
index b22d45c05..5a57ba3a6 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java
@@ -62,7 +62,7 @@ public class AxKeyInfoTest {
assertEquals(testKeyInfo, testKeyInfo); // NOSONAR
assertEquals(testKeyInfo, clonedReferenceKey);
assertNotNull(testKeyInfo);
- assertNotEquals(testKeyInfo, new AxArtifactKey());
+ assertNotEquals(testKeyInfo, (Object) new AxArtifactKey());
assertNotEquals(testKeyInfo, new AxKeyInfo(new AxArtifactKey()));
assertNotEquals(testKeyInfo, new AxKeyInfo(key, UUID.randomUUID(), "Some Description"));
assertNotEquals(testKeyInfo, new AxKeyInfo(key, uuid, "Some Description"));
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java
index 60c848d17..1e8e7f5af 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java
@@ -111,7 +111,7 @@ public class AxKeyTest {
assertNotNull(someKey0);
// disabling sonar because this code tests the equals() method
assertEquals(someKey0, someKey0); // NOSONAR
- assertNotEquals(someKey0, new AxReferenceKey());
+ assertNotEquals(someKey0, (Object) new AxReferenceKey());
AxArtifactKey nullKey0 = AxArtifactKey.getNullKey();
assertTrue(nullKey0.isNullKey());
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java
index 4c6020226..5346b6b21 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java
@@ -63,7 +63,7 @@ public class AxKeyUseTest {
// disabling sonar because this code tests the equals() method
assertEquals(keyUse, keyUse); // NOSONAR
assertEquals(keyUse, clonedKeyUse);
- assertNotEquals(keyUse, "Hello");
+ assertNotEquals(keyUse, (Object) "Hello");
assertEquals(keyUse, new AxKeyUse(key));
assertEquals(0, keyUse.compareTo(keyUse));
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java
index e7bbef476..515587558 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java
@@ -89,7 +89,7 @@ public class AxReferenceKeyTest {
// disabling sonar because this code tests the equals() method
assertEquals(testReferenceKey, testReferenceKey); // NOSONAR
assertEquals(testReferenceKey, clonedReferenceKey);
- assertNotEquals(testReferenceKey, "Hello");
+ assertNotEquals(testReferenceKey, (Object) "Hello");
assertNotEquals(testReferenceKey, new AxReferenceKey("PKN", "0.0.2", "PLN", "LN"));
assertNotEquals(testReferenceKey, new AxReferenceKey("NPKN", "0.0.2", "PLN", "LN"));
assertNotEquals(testReferenceKey, new AxReferenceKey("NPKN", "0.0.1", "PLN", "LN"));
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java
index c2657bc7e..8ce072c68 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java
@@ -73,7 +73,7 @@ public class SupportApexBasicModelConceptsTester {
assertEquals(model, model); // NOSONAR
assertEquals(model, clonedModel);
assertNotNull(model);
- assertNotEquals(model, "Hello");
+ assertNotEquals(model, (Object) "Hello");
clonedModel.getKey().setVersion("0.0.2");
assertNotEquals(model, clonedModel);
clonedModel.getKey().setVersion("0.0.1");
@@ -95,7 +95,7 @@ public class SupportApexBasicModelConceptsTester {
final AxKeyInformation clonedKeyI = new AxKeyInformation(keyI);
assertNotNull(keyI);
- assertNotEquals(keyI, new AxArtifactKey());
+ assertNotEquals(keyI, (Object) new AxArtifactKey());
assertEquals(keyI, clonedKeyI);
clonedKeyI.setKey(new AxArtifactKey());