Skip to content

Commit 9983b1f

Browse files
committed
Make report format tests more reliable
This commit ensures that report format tests don't break when the ordering of reported missing fields change.
1 parent 435ef4a commit 9983b1f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spring-graphql/src/test/java/org/springframework/graphql/execution/SchemaMappingInspectorTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,11 @@ void reportUnmappedField() {
534534
""";
535535
SchemaReport report = inspectSchema(schema, BookController.class);
536536
assertThatReport(report).hasUnmappedFieldCount(1).hasSkippedTypeCount(0);
537-
assertThat(report.toString()).isEqualTo("""
538-
GraphQL schema inspection:
539-
Unmapped fields: {Book=[missing]}
540-
Unmapped registrations: {Book.fetcher=BookController#fetcher[1 args], Query.paginatedBooks=BookController#paginatedBooks[0 args], Query.bookObject=BookController#bookObject[1 args], Query.bookById=BookController#bookById[1 args]}
541-
Skipped types: []""");
537+
assertThat(report.toString())
538+
.contains("GraphQL schema inspection:", "Unmapped fields: {Book=[missing]}", "Unmapped registrations:",
539+
"{Book.fetcher=BookController#fetcher[1 args]", " Query.paginatedBooks=BookController#paginatedBooks[0 args]",
540+
"Query.bookObject=BookController#bookObject[1 args]", "Query.bookById=BookController#bookById[1 args]",
541+
"Skipped types: []");
542542
}
543543

544544
}

0 commit comments

Comments
 (0)