From 281cd97df5d674d2a4168a80e2e0a21b7c21e076 Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Tue, 12 Sep 2023 15:27:38 +0100 Subject: Upgrade drools-applications to JUnit 5 Issue-ID: POLICY-4819 Change-Id: I33e1f156a1ea0e98cb6386a7d10d06be4dc258d9 Signed-off-by: FrancescoFioraEst --- .../coordination/CoordinationDirectiveTest.java | 11 ++++++----- .../java/org/onap/policy/coordination/UtilTest.java | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 14 deletions(-) (limited to 'controlloop/common/coordination') diff --git a/controlloop/common/coordination/src/test/java/org/onap/policy/coordination/CoordinationDirectiveTest.java b/controlloop/common/coordination/src/test/java/org/onap/policy/coordination/CoordinationDirectiveTest.java index 47d11dd62..96846ecb4 100644 --- a/controlloop/common/coordination/src/test/java/org/onap/policy/coordination/CoordinationDirectiveTest.java +++ b/controlloop/common/coordination/src/test/java/org/onap/policy/coordination/CoordinationDirectiveTest.java @@ -3,6 +3,7 @@ * controlloop * ================================================================================ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,16 +22,16 @@ package org.onap.policy.coordination; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import java.util.Arrays; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class CoordinationDirectiveTest { +class CoordinationDirectiveTest { @Test - public void test() { + void test() { CoordinationDirective cd1 = new CoordinationDirective(); diff --git a/controlloop/common/coordination/src/test/java/org/onap/policy/coordination/UtilTest.java b/controlloop/common/coordination/src/test/java/org/onap/policy/coordination/UtilTest.java index 21998a7b4..d1b99ab27 100644 --- a/controlloop/common/coordination/src/test/java/org/onap/policy/coordination/UtilTest.java +++ b/controlloop/common/coordination/src/test/java/org/onap/policy/coordination/UtilTest.java @@ -3,6 +3,7 @@ * controlloop * ================================================================================ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,19 +22,19 @@ package org.onap.policy.coordination; import static org.assertj.core.api.Assertions.assertThatNullPointerException; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class UtilTest { +class UtilTest { @Test - public void test() { + void test() { - String filename = "src/test/resources/test_coordination_directive.yaml"; - CoordinationDirective cd1 = Util.loadCoordinationDirectiveFromFile(filename); + var filename = "src/test/resources/test_coordination_directive.yaml"; + var cd1 = Util.loadCoordinationDirectiveFromFile(filename); assertNotNull(cd1); @@ -46,7 +47,7 @@ public class UtilTest { assertEquals("cf", cd1.getCoordinationFunction()); filename = "src/test/resources/non_existent_coordination_directive.yaml"; - CoordinationDirective cd2 = Util.loadCoordinationDirectiveFromFile(filename); + var cd2 = Util.loadCoordinationDirectiveFromFile(filename); assertNull(cd2); -- cgit 1.2.3-korg