Closed kharybdys closed 2 years ago
I'm planning on adding more tests in the near future
Your unit tests print text, which I think is considered "bad form", they should simply either succeed silently or fail with a clear stack trace. Any other text is distracting.
Your unit tests print text, which I think is considered "bad form", they should simply either succeed silently or fail with a clear stack trace. Any other text is distracting.
Are you bothered with the System.out.println's or with the single assertTrue in the helper function deleteFilesAndcreateDeleteEventForFiles ? The first are there purely for debugging purposes, the latter is because a) it's a helper function and b) it shouldn't happen, but it's important to catch that exception there I think. For this one you'd just not catch the exception?
I am refering to the System.*.println
statements. If they are there to debug the unit tests themselves, they should be removed before a pull request (because they are no longer needed). If they are there to debug the actual code itself, I am confused, since the unit test runners give the same kind of information.
I found them useful to figure out which part of my console was about the test that just failed when running the full suite (and yes I know I can rerun the failing test on its own to get the same effect). I would've put them on logger.debug level except that, as far as I know, JUnit doesn't have a logger implementation. But I'll remove them, my JUnit skills probably need some improving.
Includes adding support for testing this