From af22e3a341b069c69a4e7b8bdf95819353400890 Mon Sep 17 00:00:00 2001 From: mk868 Date: Fri, 23 Aug 2024 08:10:52 +0200 Subject: [PATCH] Update to JUnit5 (#39) --- pom.xml | 10 +++++----- src/test/java/io/ipfs/multihash/MultihashTest.java | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index ceda4b1..768ff1a 100644 --- a/pom.xml +++ b/pom.xml @@ -32,8 +32,8 @@ UTF-8 UTF-8 - 4.13.2 - 2.2 + 5.11.0 + 3.0 v1.1.1 @@ -51,8 +51,8 @@ ${version.multibase} - junit - junit + org.junit.jupiter + junit-jupiter ${version.junit} test @@ -78,7 +78,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.19.1 + 3.3.1 org.apache.maven.plugins diff --git a/src/test/java/io/ipfs/multihash/MultihashTest.java b/src/test/java/io/ipfs/multihash/MultihashTest.java index e47e4a0..b4050da 100755 --- a/src/test/java/io/ipfs/multihash/MultihashTest.java +++ b/src/test/java/io/ipfs/multihash/MultihashTest.java @@ -1,19 +1,19 @@ package io.ipfs.multihash; import io.ipfs.multibase.*; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.*; import java.security.MessageDigest; import java.util.Arrays; import java.util.List; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; -public class MultihashTest { +class MultihashTest { @Test - public void base58Test() { + void base58Test() { List examples = Arrays.asList("QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", "QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy"); for (String example: examples) { @@ -24,7 +24,7 @@ public void base58Test() { } @Test - public void decodeTest() throws IOException { + void decodeTest() throws IOException { List base58 = Arrays.asList( "QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", "QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy" @@ -40,7 +40,7 @@ public void decodeTest() throws IOException { } @Test - public void multihashTest() { + void multihashTest() { Object[][] examples = new Object[][]{ {Multihash.Type.id, "ID", "13hC12xCn", "hello"}, {Multihash.Type.id, "ID", "11", ""},