diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-07-13 12:55:42 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-07-13 12:55:42 +0000 |
commit | 2649f1da1ac58352d6d11c48923ee86930e3e8ee (patch) | |
tree | b612c05875a07c690be1372e11c53281b4ea5871 /core/core-engine | |
parent | b09f7de07ee653397d1287314260f1df67b66bf6 (diff) | |
parent | d879346e830b810eeccf8283fa16e04a9cfafbc8 (diff) |
Merge "Fix assertTrue SONAR issues in apex-pdp/contex and apex-pdp/core"
Diffstat (limited to 'core/core-engine')
-rw-r--r-- | core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnEventTest.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnEventTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnEventTest.java index e3d0b32b8..225e1853f 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnEventTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnEventTest.java @@ -1,19 +1,20 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ @@ -21,7 +22,8 @@ package org.onap.policy.apex.core.engine.event; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -195,14 +197,14 @@ public class EnEventTest { event.clear(); assertNull(event.get("MyField")); - assertTrue(event.hashCode() != 0); + assertNotEquals(0, event.hashCode()); - assertTrue(event.equals(event)); - assertFalse(event.equals(null)); + assertEquals(event, event); + assertNotNull(event); Map<String, Object> hashMap = new HashMap<>(); - assertFalse(event.equals(hashMap)); + assertNotEquals(event, hashMap); EnEvent otherEvent = new EnEvent(eventKey); - assertTrue(event.equals(otherEvent)); + assertEquals(event, otherEvent); } } |