Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- What's the best way to check that the output is stable using junit?
- public void testMethodOutput() {
- if (new File(expectedOutput).exists()) {
- // check method output against file
- } else {
- // generate expected output from current behaviour; test passes automatically
- // (saves output to the expected-output file)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement