What are the use cases of TestOf? I'm new to NUnit testing and from what I have seen, most people don't use this attribute that much.
From my experience, TestOf
helped me to quickly identify what class is being tested and make the navigation between test and the production code easier. I think this is the main intention of using TestOf
. Feel free to correct me if I'm wrong.
However , some test fixtures that I have seen use an approach where the test fixture is named in a way that it reflects the class it is testing. This is mostly done by adding 'Test' to the end of the class that is being tested. That is: SomeClass
will have a test fixture named SomeClassTest
In these type of naming conventions, TestOf will be completely useless.
Would be great if someone can clarify the actual usage of TestOf attribute