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
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: