Make report format tests more reliable
This commit ensures that report format tests don't break when the ordering of reported missing fields change.
This commit is contained in:
@@ -534,11 +534,11 @@ class SchemaMappingInspectorTests {
|
||||
""";
|
||||
SchemaReport report = inspectSchema(schema, BookController.class);
|
||||
assertThatReport(report).hasUnmappedFieldCount(1).hasSkippedTypeCount(0);
|
||||
assertThat(report.toString()).isEqualTo("""
|
||||
GraphQL schema inspection:
|
||||
Unmapped fields: {Book=[missing]}
|
||||
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]}
|
||||
Skipped types: []""");
|
||||
assertThat(report.toString())
|
||||
.contains("GraphQL schema inspection:", "Unmapped fields: {Book=[missing]}", "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]",
|
||||
"Skipped types: []");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user