Private Methods
- You should not test private methods!
- You should really test the public API
Reasons to not test private methods:
- The method might use private attributes, which u cannot change
- You are testing implementation detail
- It will slow down future development, since now you will need to change way more tests
But I realllllly want to test this private method
- If the method is huge and its seems to be breaking the expert principle, consider moving it to a new class where the method is public
- no - don’t use reflection