Skip to content

Commit af22e3a

Browse files
authoredAug 23, 2024
Update to JUnit5 (#39)
1 parent b78a6e3 commit af22e3a

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed
 

‎pom.xml

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<properties>
3333
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3434
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
35-
<version.junit>4.13.2</version.junit>
36-
<version.hamcrest>2.2</version.hamcrest>
35+
<version.junit>5.11.0</version.junit>
36+
<version.hamcrest>3.0</version.hamcrest>
3737
<version.multibase>v1.1.1</version.multibase>
3838
</properties>
3939

@@ -51,8 +51,8 @@
5151
<version>${version.multibase}</version>
5252
</dependency>
5353
<dependency>
54-
<groupId>junit</groupId>
55-
<artifactId>junit</artifactId>
54+
<groupId>org.junit.jupiter</groupId>
55+
<artifactId>junit-jupiter</artifactId>
5656
<version>${version.junit}</version>
5757
<scope>test</scope>
5858
</dependency>
@@ -78,7 +78,7 @@
7878
<plugin>
7979
<groupId>org.apache.maven.plugins</groupId>
8080
<artifactId>maven-surefire-plugin</artifactId>
81-
<version>2.19.1</version>
81+
<version>3.3.1</version>
8282
</plugin>
8383
<plugin>
8484
<groupId>org.apache.maven.plugins</groupId>

‎src/test/java/io/ipfs/multihash/MultihashTest.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
package io.ipfs.multihash;
22

33
import io.ipfs.multibase.*;
4-
import org.junit.Test;
4+
import org.junit.jupiter.api.Test;
55

66
import java.io.*;
77
import java.security.MessageDigest;
88
import java.util.Arrays;
99
import java.util.List;
1010

11-
import static org.junit.Assert.*;
11+
import static org.junit.jupiter.api.Assertions.*;
1212

13-
public class MultihashTest {
13+
class MultihashTest {
1414

1515
@Test
16-
public void base58Test() {
16+
void base58Test() {
1717
List<String> examples = Arrays.asList("QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB",
1818
"QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy");
1919
for (String example: examples) {
@@ -24,7 +24,7 @@ public void base58Test() {
2424
}
2525

2626
@Test
27-
public void decodeTest() throws IOException {
27+
void decodeTest() throws IOException {
2828
List<String> base58 = Arrays.asList(
2929
"QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB",
3030
"QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy"
@@ -40,7 +40,7 @@ public void decodeTest() throws IOException {
4040
}
4141

4242
@Test
43-
public void multihashTest() {
43+
void multihashTest() {
4444
Object[][] examples = new Object[][]{
4545
{Multihash.Type.id, "ID", "13hC12xCn", "hello"},
4646
{Multihash.Type.id, "ID", "11", ""},

0 commit comments

Comments
 (0)