I am writing a custom logger for a program. I am using NLog as much as possible. I am looking to verify functionality and have written some unit tests using the AAA pattern.
However this causes the problem with Assert.... How can I/Whats the best method for Asserting a file write happened... and it wrote out correctly.
I mean I can do a file.read to get the last line, and assert it is equal to the param written out... I just dont know if that defeats the AAA purpose....
One Unit Test should not influence the outcome of another unit test.
AND
unit tests may run in parallel
So: you should not log from several tests to the same file.