Skip to content

Commit 01a30aa

Browse files
committed
chore: remove jupiter test dependency
1 parent 89557ab commit 01a30aa

2 files changed

Lines changed: 9 additions & 18 deletions

File tree

pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,6 @@
132132
<artifactId>oauth2-oidc-sdk</artifactId>
133133
<version>${oauth2-oidc-sdk.version}</version>
134134
</dependency>
135-
<dependency>
136-
<groupId>org.junit.jupiter</groupId>
137-
<artifactId>junit-jupiter-api</artifactId>
138-
<version>${junit.version}</version>
139-
<scope>test</scope>
140-
</dependency>
141135
<dependency>
142136
<groupId>org.testcontainers</groupId>
143137
<artifactId>weaviate</artifactId>

src/test/java/io/weaviate/client6/v1/internal/grpc/ByteStringUtilTest.java

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
package io.weaviate.client6.v1.internal.grpc;
22

3-
import static org.junit.Assert.assertArrayEquals;
4-
import static org.junit.jupiter.api.Assertions.assertEquals;
5-
63
import org.assertj.core.api.Assertions;
74
import org.junit.Test;
85

@@ -21,68 +18,68 @@ public void test_encodeVector_1d() {
2118
float[] vector = { 1f, 2f, 3f };
2219
byte[] want = { 0, 0, -128, 63, 0, 0, 0, 64, 0, 0, 64, 64 };
2320
byte[] got = ByteStringUtil.encodeVectorSingle(vector).toByteArray();
24-
assertArrayEquals(want, got);
21+
Assertions.assertThat(got).isEqualTo(want);
2522
}
2623

2724
@Test
2825
public void test_decodeVector_1d() {
2926
byte[] bytes = { 0, 0, -128, 63, 0, 0, 0, 64, 0, 0, 64, 64 };
3027
float[] want = { 1f, 2f, 3f };
3128
float[] got = ByteStringUtil.decodeVectorSingle(ByteString.copyFrom(bytes));
32-
assertArrayEquals(want, got, 0);
29+
Assertions.assertThat(got).isEqualTo(want);
3330
}
3431

3532
@Test
3633
public void test_encodeVector_2d() {
3734
float[][] vector = { { 1f, 2f, 3f }, { 4f, 5f, 6f } };
3835
byte[] want = { 3, 0, 0, 0, -128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, -128, 64, 0, 0, -96, 64, 0, 0, -64, 64 };
3936
byte[] got = ByteStringUtil.encodeVectorMulti(vector).toByteArray();
40-
assertArrayEquals(want, got);
37+
Assertions.assertThat(got).isEqualTo(want);
4138
}
4239

4340
@Test
4441
public void test_decodeVector_2d() {
4542
byte[] bytes = { 3, 0, 0, 0, -128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 0, 0, -128, 64, 0, 0, -96, 64, 0, 0, -64, 64 };
4643
float[][] want = { { 1f, 2f, 3f }, { 4f, 5f, 6f } };
4744
float[][] got = ByteStringUtil.decodeVectorMulti(ByteString.copyFrom(bytes));
48-
assertArrayEquals(want, got);
45+
Assertions.assertThat(got).isEqualTo(want);
4946
}
5047

5148
@Test
5249
public void test_decodeUuid() {
5350
byte[] bytes = { 38, 19, -74, 24, -114, -19, 73, 43, -112, -60, 47, 96, 83, -89, -35, -23 };
5451
String want = "2613b618-8eed-492b-90c4-2f6053a7dde9";
5552
String got = ByteStringUtil.decodeUuid(ByteString.copyFrom(bytes)).toString();
56-
assertEquals(want, got);
53+
Assertions.assertThat(got).isEqualTo(want);
5754
}
5855

5956
@Test
6057
public void test_decodeVector_1d_empty() {
6158
byte[] bytes = new byte[0];
6259
float[] got = ByteStringUtil.decodeVectorSingle(ByteString.copyFrom(bytes));
63-
assertEquals(0, got.length);
60+
Assertions.assertThat(got).isEmpty();
6461
}
6562

6663
@Test
6764
public void test_decodeVector_2d_empty() {
6865
byte[] bytes = new byte[0];
6966
float[][] got = ByteStringUtil.decodeVectorMulti(ByteString.copyFrom(bytes));
70-
assertEquals(0, got.length);
67+
Assertions.assertThat(got).isEmpty();
7168
}
7269

7370
@Test
7471
public void test_decodeVector_2d_dim_zero() {
7572
byte[] bytes = { 0, 0 };
7673
float[][] got = ByteStringUtil.decodeVectorMulti(ByteString.copyFrom(bytes));
77-
assertEquals(0, got.length);
74+
Assertions.assertThat(got).isEmpty();
7875
}
7976

8077
@Test
8178
public void test_decodeIntValues() {
8279
byte[] bytes = { 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0 };
8380
long[] want = { 1, 2, 3 };
8481
long[] got = ByteStringUtil.decodeIntValues(ByteString.copyFrom(bytes));
85-
assertArrayEquals(want, got);
82+
Assertions.assertThat(got).isEqualTo(want);
8683
}
8784

8885
@Test

0 commit comments

Comments
 (0)