diff options
Diffstat (limited to 'model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java')
-rw-r--r-- | model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java | 30 |
1 files changed, 14 insertions, 16 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 d3d533400..655df059a 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 @@ -1,20 +1,20 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019-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========================================================= */ @@ -22,10 +22,8 @@ package org.onap.policy.apex.model.policymodel.concepts; 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.assertTrue; import static org.junit.Assert.fail; import org.junit.Test; @@ -36,7 +34,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.Validat /** * Test apex logic. - * + * * @author Liam Fallon (liam.fallon@ericsson.com) */ public class LogicTest { @@ -154,16 +152,16 @@ public class LogicTest { + "parentLocalName=PLN,localName=LN),logicFlavour=LogicFlavour,logic=Logic)", clonedLogic.toString()); - assertFalse(logic.hashCode() == 0); + assertNotEquals(0, logic.hashCode()); - assertTrue(logic.equals(logic)); - assertTrue(logic.equals(clonedLogic)); - assertFalse(logic.equals(null)); - assertFalse(logic.equals((Object) "Hello")); - assertFalse(logic.equals(new AxLogic(AxReferenceKey.getNullKey(), "LogicFlavour", "Logic"))); - assertFalse(logic.equals(new AxLogic(logicKey, "AnotherLogicFlavour", "Logic"))); - assertFalse(logic.equals(new AxLogic(logicKey, "LogicFlavour", "AnotherLogic"))); - assertTrue(logic.equals(new AxLogic(logicKey, "LogicFlavour", "Logic"))); + assertEquals(logic, logic); + assertEquals(logic, clonedLogic); + assertNotNull(logic); + 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")); + assertEquals(logic, new AxLogic(logicKey, "LogicFlavour", "Logic")); assertEquals(0, logic.compareTo(logic)); assertEquals(0, logic.compareTo(clonedLogic)); |