Background
I am learning how to use the NUnit unit testing framework for Unity. I have found that when all of the tests get run (with the built-in editor testing tool), all of the error/logging that my code has gets poured into the console which is not necessarily what was desired. For example, if I have a piece of code that recognizes that an array is the wrong size and displays an error, I will want to have a test case for it. I do not have it actually print the error to the console every time the tests get run.
The best way (if the tests run in a menial amount of time) to unit test is to run all tests whenever the code changes. Unity does give this as an option (right click on “Editor Tests” tab → enable “Run on recompilation”). But then the console gets dumped on…
Question
Is there any way to disable the logging and error printouts for the code that the unit tester executes? Perhaps a decorator for a unit testing class or method?