11package  org .springframework .data .r2dbc .dialect ;
22
33import  static  org .assertj .core .api .Assertions .*;
4+ import  static  org .assertj .core .api .SoftAssertions .*;
5+ 
6+ import  java .util .List ;
47
5- import  org .assertj .core .api .SoftAssertions ;
68import  org .junit .Test ;
79import  org .springframework .data .mapping .model .SimpleTypeHolder ;
810
@@ -30,7 +32,7 @@ public void shouldConsiderSimpleTypes() {
3032
3133		SimpleTypeHolder  holder  = PostgresDialect .INSTANCE .getSimpleTypeHolder ();
3234
33- 		SoftAssertions . assertSoftly (it  -> {
35+ 		assertSoftly (it  -> {
3436			it .assertThat (holder .isSimpleType (String .class )).isTrue ();
3537			it .assertThat (holder .isSimpleType (int .class )).isTrue ();
3638			it .assertThat (holder .isSimpleType (Integer .class )).isTrue ();
@@ -50,9 +52,11 @@ public void shouldUseBoxedArrayTypesForPrimitiveTypes() {
5052
5153		ArrayColumns  arrayColumns  = PostgresDialect .INSTANCE .getArraySupport ();
5254
53- 		assertThat (arrayColumns .getArrayType (int .class )).isEqualTo (Integer .class );
54- 		assertThat (arrayColumns .getArrayType (double .class )).isEqualTo (Double .class );
55- 		assertThat (arrayColumns .getArrayType (String .class )).isEqualTo (String .class );
55+ 		assertSoftly (it  -> {
56+ 			it .assertThat (arrayColumns .getArrayType (int .class )).isEqualTo (Integer .class );
57+ 			it .assertThat (arrayColumns .getArrayType (double .class )).isEqualTo (Double .class );
58+ 			it .assertThat (arrayColumns .getArrayType (String .class )).isEqualTo (String .class );
59+ 		});
5660	}
5761
5862	@ Test  // gh-30 
@@ -62,4 +66,12 @@ public void shouldRejectNonSimpleArrayTypes() {
6266
6367		assertThatThrownBy (() -> arrayColumns .getArrayType (getClass ())).isInstanceOf (IllegalArgumentException .class );
6468	}
69+ 
70+ 	@ Test  // gh-30 
71+ 	public  void  shouldRejectNestedCollections () {
72+ 
73+ 		ArrayColumns  arrayColumns  = PostgresDialect .INSTANCE .getArraySupport ();
74+ 
75+ 		assertThatThrownBy (() -> arrayColumns .getArrayType (List .class )).isInstanceOf (IllegalArgumentException .class );
76+ 	}
6577}
0 commit comments