Skip to content

Commit f2de1bd

Browse files
committed
Upgrade to JUnit 5 and replace Hamcrest with AssertJ
1 parent 05314e8 commit f2de1bd

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/test/java/org/lmdbjava/ComparatorTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ public final class ComparatorTest {
5656

5757
static Stream<Arguments> comparatorProvider() {
5858
return Stream.of(
59-
Arguments.arguments("StringRunner", new StringRunner()),
60-
Arguments.arguments("DirectBufferRunner", new DirectBufferRunner()),
61-
Arguments.arguments("ByteArrayRunner", new ByteArrayRunner()),
62-
Arguments.arguments("UnsignedByteArrayRunner", new UnsignedByteArrayRunner()),
63-
Arguments.arguments("ByteBufferRunner", new ByteBufferRunner()),
64-
Arguments.arguments("NettyRunner", new NettyRunner()),
65-
Arguments.arguments("GuavaUnsignedBytes", new GuavaUnsignedBytes()),
66-
Arguments.arguments("GuavaSignedBytes", new GuavaSignedBytes()));
59+
Arguments.argumentSet("StringRunner", new StringRunner()),
60+
Arguments.argumentSet("DirectBufferRunner", new DirectBufferRunner()),
61+
Arguments.argumentSet("ByteArrayRunner", new ByteArrayRunner()),
62+
Arguments.argumentSet("UnsignedByteArrayRunner", new UnsignedByteArrayRunner()),
63+
Arguments.argumentSet("ByteBufferRunner", new ByteBufferRunner()),
64+
Arguments.argumentSet("NettyRunner", new NettyRunner()),
65+
Arguments.argumentSet("GuavaUnsignedBytes", new GuavaUnsignedBytes()),
66+
Arguments.argumentSet("GuavaSignedBytes", new GuavaSignedBytes()));
6767
}
6868

6969
private static byte[] buffer(final int... bytes) {
@@ -76,7 +76,7 @@ private static byte[] buffer(final int... bytes) {
7676

7777
@ParameterizedTest
7878
@MethodSource("comparatorProvider")
79-
void atLeastOneBufferHasEightBytes(final String str, final ComparatorRunner comparator) {
79+
void atLeastOneBufferHasEightBytes(final ComparatorRunner comparator) {
8080
assertThat(get(comparator.compare(HLLLLLLL, LLLLLLLL))).isEqualTo(GREATER_THAN);
8181
assertThat(get(comparator.compare(LLLLLLLL, HLLLLLLL))).isEqualTo(LESS_THAN);
8282

@@ -95,7 +95,7 @@ void atLeastOneBufferHasEightBytes(final String str, final ComparatorRunner comp
9595

9696
@ParameterizedTest
9797
@MethodSource("comparatorProvider")
98-
void buffersOfTwoBytes(final String str, final ComparatorRunner comparator) {
98+
void buffersOfTwoBytes(final ComparatorRunner comparator) {
9999
assertThat(get(comparator.compare(LL, XX))).isEqualTo(GREATER_THAN);
100100
assertThat(get(comparator.compare(XX, LL))).isEqualTo(LESS_THAN);
101101

@@ -111,7 +111,7 @@ void buffersOfTwoBytes(final String str, final ComparatorRunner comparator) {
111111

112112
@ParameterizedTest
113113
@MethodSource("comparatorProvider")
114-
void equalBuffers(final String str, final ComparatorRunner comparator) {
114+
void equalBuffers(final ComparatorRunner comparator) {
115115
assertThat(get(comparator.compare(LL, LL))).isEqualTo(EQUAL_TO);
116116
assertThat(get(comparator.compare(HX, HX))).isEqualTo(EQUAL_TO);
117117
assertThat(get(comparator.compare(LH, LH))).isEqualTo(EQUAL_TO);

src/test/java/org/lmdbjava/CursorParamTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ public final class CursorParamTest {
5858

5959
static Stream<Arguments> data() {
6060
return Stream.of(
61-
Arguments.arguments("ByteBufferRunner(PROXY_OPTIMAL)", new ByteBufferRunner(PROXY_OPTIMAL)),
62-
Arguments.arguments("ByteBufferRunner(PROXY_SAFE)", new ByteBufferRunner(PROXY_SAFE)),
63-
Arguments.arguments("ByteArrayRunner(PROXY_BA)", new ByteArrayRunner(PROXY_BA)),
64-
Arguments.arguments("DirectBufferRunner", new DirectBufferRunner()),
65-
Arguments.arguments("NettyBufferRunner", new NettyBufferRunner()));
61+
Arguments.argumentSet("ByteBufferRunner(PROXY_OPTIMAL)", new ByteBufferRunner(PROXY_OPTIMAL)),
62+
Arguments.argumentSet("ByteBufferRunner(PROXY_SAFE)", new ByteBufferRunner(PROXY_SAFE)),
63+
Arguments.argumentSet("ByteArrayRunner(PROXY_BA)", new ByteArrayRunner(PROXY_BA)),
64+
Arguments.argumentSet("DirectBufferRunner", new DirectBufferRunner()),
65+
Arguments.argumentSet("NettyBufferRunner", new NettyBufferRunner()));
6666
}
6767

6868
@ParameterizedTest
6969
@MethodSource("data")
70-
void execute(final String name, final BufferRunner<?> runner, @TempDir final Path tmp) {
70+
void execute(final BufferRunner<?> runner, @TempDir final Path tmp) {
7171
runner.execute(tmp);
7272
}
7373

0 commit comments

Comments
 (0)