From fe9e3e1b7804c6d5e63409a0bf1cb1480a4c8899 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 23 Mar 2022 06:29:03 +0100 Subject: [PATCH] Migrate concepts to Jupiter API These are simple tests, use JUnit5 for them. Change-Id: Idec56d9cd729834804ba5188fb6a6cdbfcff8552 Signed-off-by: Robert Varga --- .../concepts/AbstractIllegalArgumentCodecTest.java | 4 ++-- .../yangtools/concepts/CheckedValueTest.java | 12 ++++++------ .../opendaylight/yangtools/concepts/SemVerTest.java | 12 +++++------- .../yangtools/concepts/WritableObjectsTest.java | 4 ++-- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/AbstractIllegalArgumentCodecTest.java b/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/AbstractIllegalArgumentCodecTest.java index b645e3051c..ae85a21301 100644 --- a/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/AbstractIllegalArgumentCodecTest.java +++ b/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/AbstractIllegalArgumentCodecTest.java @@ -7,9 +7,9 @@ */ package org.opendaylight.yangtools.concepts; -import static org.junit.Assert.assertThrows; +import static org.junit.jupiter.api.Assertions.assertThrows; -import org.junit.Test; +import org.junit.jupiter.api.Test; @Deprecated(since = "8.0.0", forRemoval = true) public class AbstractIllegalArgumentCodecTest { diff --git a/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/CheckedValueTest.java b/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/CheckedValueTest.java index 237b9334f3..9ebaee5ef5 100644 --- a/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/CheckedValueTest.java +++ b/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/CheckedValueTest.java @@ -7,11 +7,11 @@ */ package org.opendaylight.yangtools.concepts; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertThrows; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; @@ -22,7 +22,7 @@ import static org.mockito.Mockito.verifyNoInteractions; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Supplier; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class CheckedValueTest { @Test diff --git a/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/SemVerTest.java b/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/SemVerTest.java index 56e45e4d0b..8d44626097 100644 --- a/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/SemVerTest.java +++ b/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/SemVerTest.java @@ -5,18 +5,16 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.yangtools.concepts; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class SemVerTest { - @Test public void testSemVer() { final SemVer semVer = SemVer.create(5); diff --git a/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/WritableObjectsTest.java b/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/WritableObjectsTest.java index f019219cc5..f74b040a58 100644 --- a/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/WritableObjectsTest.java +++ b/common/concepts/src/test/java/org/opendaylight/yangtools/concepts/WritableObjectsTest.java @@ -7,12 +7,12 @@ */ package org.opendaylight.yangtools.concepts; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class WritableObjectsTest { -- 2.36.6