The mitkLevelWindowManagerTest should be refactored because of several reasons:
- It uses the old MITK test style instead of the CppUnit test framework
- It does not test all property changes (e.g. no layer change, selected change, image rendering mode change ...)
- It uses random tests (random value changes) which is something that shouldn't be done.
Random tests (monkey testing) are problematic in my opinion: Failing tests are hard to debug so it might take a long time to actually find the error. Random values are hard to reproduce, which renders them useless in this scenario (this is even more so true since no seed is provided, leading to "real" random values).
They might have their power when it comes to certain types of tests but in this scenario I think a clean definition of what is tested is more helpful.
Additionally the code is very hard to understand since documentation is missing. Having clear and cleanly defined test cases can also be used for self-documentation.
What's your opinion on this?