Skip to content

Commit 2b1b5d1

Browse files
committed
Remove outdated usage of AssertFile in documentation
Resolves #4754
1 parent f9108ee commit 2b1b5d1

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

spring-batch-docs/modules/ROOT/pages/testing.adoc

-20
Original file line numberDiff line numberDiff line change
@@ -274,26 +274,6 @@ int count = StepScopeTestUtils.doInStepScope(stepExecution,
274274
});
275275
----
276276

277-
[[validatingOutputFiles]]
278-
== Validating Output Files
279-
280-
When a batch job writes to the database, it is easy to query the database to verify that
281-
the output is as expected. However, if the batch job writes to a file, it is equally
282-
important that the output be verified. Spring Batch provides a class called `AssertFile`
283-
to facilitate the verification of output files. The method called `assertFileEquals` takes
284-
two `File` objects (or two `Resource` objects) and asserts, line by line, that the two
285-
files have the same content. Therefore, it is possible to create a file with the expected
286-
output and to compare it to the actual result, as the following example shows:
287-
288-
[source, java]
289-
----
290-
private static final String EXPECTED_FILE = "src/main/resources/data/input.txt";
291-
private static final String OUTPUT_FILE = "target/test-outputs/output.txt";
292-
293-
AssertFile.assertFileEquals(new FileSystemResource(EXPECTED_FILE),
294-
new FileSystemResource(OUTPUT_FILE));
295-
----
296-
297277
[[mockingDomainObjects]]
298278
== Mocking Domain Objects
299279

0 commit comments

Comments
 (0)