File tree 2 files changed +16
-4
lines changed
src/test/java/org/springframework/data/neo4j/integration
2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -805,12 +805,18 @@ void saveAllAsWithEmptyList() {
805
805
assertThat (projections ).isEmpty ();
806
806
}
807
807
808
+ static class X {
809
+ }
810
+
811
+ static class Y {
812
+ }
813
+
808
814
@ Test // GH-2544
809
815
void saveWeirdHierarchy () {
810
816
811
817
List <Object > things = new ArrayList <>();
812
- things .add (1 );
813
- things .add ("eins" );
818
+ things .add (new X () );
819
+ things .add (new Y () );
814
820
815
821
assertThatIllegalArgumentException ().isThrownBy (() -> neo4jTemplate .saveAllAs (things , ClosedProjection .class ))
816
822
.withMessage ("Could not determine a common element of an heterogeneous collection." );
Original file line number Diff line number Diff line change @@ -697,12 +697,18 @@ void saveAllAsWithEmptyList(@Autowired ReactiveNeo4jTemplate template) {
697
697
.verifyComplete ();
698
698
}
699
699
700
+ static class X {
701
+ }
702
+
703
+ static class Y {
704
+ }
705
+
700
706
@ Test // GH-2544
701
707
void saveWeirdHierarchy (@ Autowired ReactiveNeo4jTemplate template ) {
702
708
703
709
List <Object > things = new ArrayList <>();
704
- things .add (1 );
705
- things .add ("eins" );
710
+ things .add (new X () );
711
+ things .add (new Y () );
706
712
707
713
template .saveAllAs (things , ClosedProjection .class )
708
714
.as (StepVerifier ::create )
You can’t perform that action at this time.
0 commit comments