Where do you put unit tests for private functions in C# classes?
An article in Wikipedia suggests:
Personally, neither of these methods seem appropriate, and I much prefer to have unit tests located in a separate project altogether.
Any thoughts on this?
(I know there's a fair amount of debate on whether private methods should be tested at all. I'd like to hear both sides of the argument.)
Private methods do not necessarily need to be tested directly. You can determine their validity based on tests of public methods that utilize those private methods.
However, you should take care to ensure that your public methods can easily inject mock dependencies into your private methods to facilitate testing and simulate all reasonable scenarios.
Edit: As for where your other tests should be located, I suggest a separate subdirectory within your project to handle your tests. When writing tests for PHP applications, I have a tests directory in the root of my project whose directory structure is identical to that of my real application directory structure. In it, I have a test class for each real class.
Just don't compile your test classes with the rest of your project when releasing to production (or in the case of an interpretted language like PHP, don't deploy the test classes to the production webserver).