Advertisement
Guest User

Untitled

a guest
May 14th, 2012
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. What's the best way to check that the output is stable using junit?
  2. public void testMethodOutput() {
  3. if (new File(expectedOutput).exists()) {
  4. // check method output against file
  5. } else {
  6. // generate expected output from current behaviour; test passes automatically
  7. // (saves output to the expected-output file)
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement