I've been confused for a while about what I perceive as conflicting guidance regarding unit tests.
Prevailing wisdom advises to test private methods only using their public interface: Making a private method public to unit test it...good idea? however unit tests themselves should test the smallest units of code e.g. individual methods http://www.javaranch.com/unit-testing.jsp these methods are therefore those most likely to be suitable for unit testing, but also the most likely to be private methods in a class (at least in my experience).
To add to my difficulty, I find TDD very helpful when developing. However as I would normally start by developing the small units of code, these methods are very likely to become private, with their functionality combining to produce some public interface member - breaking all my tests.
I know that I could use reflection for this, but again, that doesn't feel like a good solution.
I'd very much appreciate some advice on this,
Many thanks