#Private-Methods
2 notas · última:
This Is Why We Don't Test Private Methods
The post argues that private methods should be tested indirectly through public behavior, because direct tests break encapsulation and expose internals that other code should not use.
Making the best of private methods
The post argues that private methods help narrow public promises, keep code stable, and make it easier to focus on what a class does rather than how it does it. It also treats private methods as a safe place to test abstractions before promoting them.
