Skip to content

Commit c1da95f

Browse files
committed
DATAMONGO-2621 - Adapt to changed array assertions in AssertJ.
1 parent c9c0054 commit c1da95f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/convert/MappingMongoConverterUnitTests.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,7 +1867,7 @@ public SomeInterface convert(String source) {
18671867
}
18681868
};
18691869

1870-
converter.setCustomConversions(new MongoCustomConversions(Arrays.asList(enumConverter)));
1870+
converter.setCustomConversions(new MongoCustomConversions(Collections.singletonList(enumConverter)));
18711871
converter.afterPropertiesSet();
18721872

18731873
DocWithInterfacedEnum result = converter.read(DocWithInterfacedEnum.class, document);
@@ -1878,14 +1878,13 @@ public SomeInterface convert(String source) {
18781878
@Test // DATAMONGO-1904
18791879
void readsNestedArraysCorrectly() {
18801880

1881-
List<List<List<Float>>> floats = Arrays.asList(Arrays.asList(Arrays.asList(1.0f, 2.0f)));
1881+
List<List<List<Float>>> floats = Collections.singletonList(Collections.singletonList(Arrays.asList(1.0f, 2.0f)));
18821882

18831883
org.bson.Document document = new org.bson.Document("nestedFloats", floats);
18841884

18851885
WithNestedLists result = converter.read(WithNestedLists.class, document);
18861886

1887-
assertThat(result.nestedFloats).hasSize(1);
1888-
assertThat(result.nestedFloats).isEqualTo(new float[][][] { { { 1.0f, 2.0f } } });
1887+
assertThat(result.nestedFloats).hasDimensions(1, 1).isEqualTo(new float[][][] { { { 1.0f, 2.0f } } });
18891888
}
18901889

18911890
@Test // DATAMONGO-1992

0 commit comments

Comments
 (0)