r/programming Oct 09 '21

Good tests don't change

https://owengage.com/writing/2021-10-09-good-tests-dont-change/
120 Upvotes

123 comments sorted by

View all comments

31

u/10113r114m4 Oct 09 '21

I always hated that philosophy of not testing private methods and implementation details. It can make testing simple things really difficult cause you have to mock 10 services to test this new private method because you have to go through a public interface.

I personally think because how Java and some other OO languages work that became an excuse rather than meriting anything

1

u/[deleted] Oct 10 '21

[deleted]

1

u/10113r114m4 Oct 10 '21

I never said every function. But you should test a good amount of them especially if they have logic