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/policy-model | |
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/policy-model')
8 files changed, 10 insertions, 10 deletions
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java index c9dbac3e0..fbfc7c4a0 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java @@ -141,7 +141,7 @@ public class LogicTest { assertEquals(logic, logic); // NOSONAR assertEquals(logic, clonedLogic); assertNotNull(logic); - assertNotEquals(logic, "Hello"); + assertNotEquals(logic, (Object) "Hello"); assertNotEquals(logic, new AxLogic(AxReferenceKey.getNullKey(), "LogicFlavour", "Logic")); assertNotEquals(logic, new AxLogic(logicKey, "AnotherLogicFlavour", "Logic")); assertNotEquals(logic, new AxLogic(logicKey, "LogicFlavour", "AnotherLogic")); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java index 7b0dbaf86..e724a4663 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java @@ -213,7 +213,7 @@ public class PoliciesTest { assertEquals(policyPN, policyPN); // NOSONAR assertEquals(policyPN, clonedPolicy); assertNotNull(policyPN); - assertNotEquals(policyPN, "Hello"); + assertNotEquals(policyPN, (Object) "Hello"); assertNotEquals(policyPN, new AxPolicy(AxArtifactKey.getNullKey(), savedTemplate, savedStateMap, savedFirstState)); assertNotEquals(policyPN, new AxPolicy(savedPolicyKey, "SomeTemplate", savedStateMap, savedFirstState)); @@ -298,7 +298,7 @@ public class PoliciesTest { assertEquals(policies, policies); // NOSONAR assertEquals(policies, clonedPolicies); assertNotNull(policies); - assertNotEquals(policies, "Hello"); + assertNotEquals(policies, (Object) "Hello"); assertNotEquals(policies, new AxPolicies(new AxArtifactKey())); assertEquals(0, policies.compareTo(policies)); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java index 30b92ca4c..86bbf3e93 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java @@ -82,7 +82,7 @@ public class PolicyModelTest { // 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 AxPolicyModel(new AxArtifactKey())); assertNotEquals(model, new AxPolicyModel(AxArtifactKey.getNullKey(), new AxContextSchemas(schemasKey), new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey), new AxContextAlbums(albumsKey), diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java index 7e243f567..8bd29fc55 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java @@ -103,7 +103,7 @@ public class StateOutputTest { assertEquals(so, so); // NOSONAR assertEquals(so, clonedPar); assertNotNull(so); - assertNotEquals(so, "Hello"); + assertNotEquals(so, (Object) "Hello"); assertNotEquals(so, new AxStateOutput(AxReferenceKey.getNullKey(), eKey, nsKey)); assertNotEquals(so, new AxStateOutput(soKey, new AxArtifactKey(), nsKey)); assertNotEquals(so, new AxStateOutput(soKey, eKey, new AxReferenceKey())); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java index d1cd3ede3..568c47f61 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java @@ -118,7 +118,7 @@ public class StateTaskReferenceTest { assertEquals(stRef, stRef); // NOSONAR assertEquals(stRef, clonedStRef); assertNotNull(stRef); - assertNotEquals(stRef, "Hello"); + assertNotEquals(stRef, (Object) "Hello"); assertNotEquals(stRef, new AxStateTaskReference(AxReferenceKey.getNullKey(), AxStateTaskOutputType.LOGIC, soKey)); assertNotEquals(stRef, new AxStateTaskReference(stRefKey, AxStateTaskOutputType.DIRECT, soKey)); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java index 4fe554137..95a91325a 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java @@ -387,7 +387,7 @@ public class StateTest { assertEquals(state, state); // NOSONAR assertEquals(state, clonedState); assertNotNull(state); - assertNotEquals(state, "Hello"); + assertNotEquals(state, (Object) "Hello"); assertNotEquals(state, new AxState(new AxStateParamsBuilder().key(new AxReferenceKey()).trigger(triggerKey) .stateOutputs(soMap).contextAlbumReferenceSet(ctxtSet).taskSelectionLogic(tsl) .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trMap))); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java index 8af19190a..4255b495d 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java @@ -92,7 +92,7 @@ public class TaskParameterTest { assertEquals(par, par); // NOSONAR assertEquals(par, clonedPar); assertNotNull(par); - assertNotEquals(par, "Hello"); + assertNotEquals(par, (Object) "Hello"); assertNotEquals(par, new AxTaskParameter(AxReferenceKey.getNullKey(), "DefaultValue")); assertNotEquals(par, new AxTaskParameter(parKey, "OtherDefaultValue")); assertEquals(par, new AxTaskParameter(parKey, "DefaultValue")); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java index 6a6c6589f..100adb9fd 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java @@ -223,7 +223,7 @@ public class TasksTest { assertEquals(task, task); // NOSONAR assertEquals(task, clonedTask); assertNotNull(task); - assertNotEquals(task, "Hello"); + assertNotEquals(task, (Object) "Hello"); assertNotEquals(task, new AxTask(new AxArtifactKey(), ifMap, ofMap, tpMap, ctxtSet, tl)); assertNotEquals(task, new AxTask(taskKey, ifEmptyMap, ofMap, tpMap, ctxtSet, tl)); assertNotEquals(task, new AxTask(taskKey, ifMap, ofEmptyMap, tpMap, ctxtSet, tl)); @@ -307,7 +307,7 @@ public class TasksTest { assertEquals(tasks, tasks); // NOSONAR assertEquals(tasks, clonedTasks); assertNotNull(tasks); - assertNotEquals(tasks, "Hello"); + assertNotEquals(tasks, (Object) "Hello"); assertNotEquals(tasks, new AxTasks(new AxArtifactKey())); assertEquals(0, tasks.compareTo(tasks)); |