Skip to content

Commit b1e7a1c

Browse files
GH-2544 - Polishing.
1 parent b54fb73 commit b1e7a1c

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

src/test/java/org/springframework/data/neo4j/integration/imperative/Neo4jTemplateIT.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -805,12 +805,18 @@ void saveAllAsWithEmptyList() {
805805
assertThat(projections).isEmpty();
806806
}
807807

808+
static class X {
809+
}
810+
811+
static class Y {
812+
}
813+
808814
@Test // GH-2544
809815
void saveWeirdHierarchy() {
810816

811817
List<Object> things = new ArrayList<>();
812-
things.add(1);
813-
things.add("eins");
818+
things.add(new X());
819+
things.add(new Y());
814820

815821
assertThatIllegalArgumentException().isThrownBy(() -> neo4jTemplate.saveAllAs(things, ClosedProjection.class))
816822
.withMessage("Could not determine a common element of an heterogeneous collection.");

src/test/java/org/springframework/data/neo4j/integration/reactive/ReactiveNeo4jTemplateIT.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -697,12 +697,18 @@ void saveAllAsWithEmptyList(@Autowired ReactiveNeo4jTemplate template) {
697697
.verifyComplete();
698698
}
699699

700+
static class X {
701+
}
702+
703+
static class Y {
704+
}
705+
700706
@Test // GH-2544
701707
void saveWeirdHierarchy(@Autowired ReactiveNeo4jTemplate template) {
702708

703709
List<Object> things = new ArrayList<>();
704-
things.add(1);
705-
things.add("eins");
710+
things.add(new X());
711+
things.add(new Y());
706712

707713
template.saveAllAs(things, ClosedProjection.class)
708714
.as(StepVerifier::create)

0 commit comments

Comments
 (0)