File tree 1 file changed +0
-20
lines changed
spring-batch-docs/modules/ROOT/pages
1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -274,26 +274,6 @@ int count = StepScopeTestUtils.doInStepScope(stepExecution,
274
274
});
275
275
----
276
276
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
-
297
277
[[mockingDomainObjects]]
298
278
== Mocking Domain Objects
299
279
You can’t perform that action at this time.
0 commit comments