So I'm looking for some advice on how test a class I've written.
It intentionally consists of one public method Run()
which accepts varaibles and sets of a long running process. This method consists of numerous calls to private methods that perform specific tasks but shouldn't be public accessible.
My query is, in this case, it seems logical to unit tests all of my private methods. However lots of people suggest that testing private methods is a bad practice.
So my question is should I just go ahead and test the private methods or has anybody been in a similar situation and can suggest an alternative method? There is absolutely no way I can reliably test all of my private methods through the one public method.
Any help appreciated and apologies if my question isn't the clearest. The application is written in C# if thats of any help.
Thanks