You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the removal of AssertFile in 5.2 (#4181), the docs about "Validating Output Files" are outdated (source).
I suggest either removing it (since it's no longer part of spring-batch-test or rewrite it, for example to something like:
[[validatingOutputFiles]]== Validating Output Files
When a batch job writes to the database, it is easy to query the database to verify that
the output is as expected. However, if the batch job writes to a file, it is equally
important that the output be verified. Assertion libraries like AssertJ can help you with that by
asserting that two files have the same content, line by line. Therefore, it is possible to create
a file with the expected output and to compare it to the actual result, as the following example
shows:
[source, java]
----private static final File EXPECTED_FILE = new File("src/main/resources/data/input.txt");private static final File OUTPUT_FILE = new File("target/test-outputs/output.txt");Assertions.assertThat(EXPECTED_FILE).hasSameTextualContentAs(OUTPUT_FILE);----
If this altered text is okay, I could turn it into a PR.
The text was updated successfully, but these errors were encountered:
g00glen00b
changed the title
Remove AssertFile reference in "Validating Output Files" doc
Remove AssertFile reference in "Validating Output Files" docs
Jan 30, 2025
Thank you for raising this issue and for opening a PR!
I suggest either removing it (since it's no longer part of spring-batch-test or rewrite it
I would remove it. That section does not have any added value anymore after the removal of the utility class from Spring Batch. The other reason is to avoid showcasing a feature from a specific testing library (one might ask why AssertJ and not other library), which does not have its place in Spring Batch's doc in the first place.
For these reasons, I will remove the section from the docs and close #4779.
fmbenhassine
changed the title
Remove AssertFile reference in "Validating Output Files" docs
Outdated AssertFile usage in section "Validating Output Files" of the reference documentation
Mar 19, 2025
Since the removal of
AssertFile
in 5.2 (#4181), the docs about "Validating Output Files" are outdated (source).I suggest either removing it (since it's no longer part of
spring-batch-test
or rewrite it, for example to something like:If this altered text is okay, I could turn it into a PR.
The text was updated successfully, but these errors were encountered: