4 ms·
I test all public methods. Anything private is part of the implementation for those metods, and rarely would I want to test that. If I make a breaking change in
by hvidgaard 11y ago
I test all public methods. Anything private is part of the implementation for those metods, and rarely would I want to test that. If I make a breaking change in a private method, and the public unittest does not test it, it's an edge case I didn't test for, or the public method is too broad.
- nailer 11y agoThe public implementation consists of smaller private parts. If the public test fails, how do you know what specific part of the public implementation was responsible for the change?
- hvidgaard 11y agoI don't and that is not why I'm testing either. I'm testing so the contract (i.e. public methods) other developers rely on does not change. That said, I can see in the build history what checkin caused the test to fail, so I would still know where to look.