I have a scenario where I have a private method that needs to be tested and the only way I can get to that method is by calling another public method and exercising all of its logic.
This private method has a few different pathways and I would like to create tests for each of them. I could do this by creating tests for the public method and just ensure that each of the tests exercise the various pathways of the private, but that just seems like too much work and effort.
So, my question to you is this. Is it evil to use reflection to test a private method?
BTW, I know I could make the method internal and use the [InternalsVisibleTo] trick, but I do not want to make this method internal?
Thoughts, opinions, feedback,
Till next time,
[----- Remember to check out DimeCasts.Net -----]