Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove AssertFile reference in "Validating Output Files" docs #4754

Open
g00glen00b opened this issue Jan 30, 2025 · 0 comments
Open

Remove AssertFile reference in "Validating Output Files" docs #4754

g00glen00b opened this issue Jan 30, 2025 · 0 comments
Labels
status: waiting-for-triage Issues that we did not analyse yet

Comments

@g00glen00b
Copy link

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

[[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.

@g00glen00b g00glen00b added the status: waiting-for-triage Issues that we did not analyse yet label Jan 30, 2025
@g00glen00b g00glen00b changed the title Remove AssertFile reference in "Validating Output Files" doc Remove AssertFile reference in "Validating Output Files" docs Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage Issues that we did not analyse yet
Projects
None yet
Development

No branches or pull requests

1 participant