DEV Community

Discussion on: It’s Okay to Test Private Methods

Collapse
 
renegadecoder94 profile image
Jeremy Grifski

This is another argument I hear a lot, and I don’t think it’s always that simple. Busting out a new class every time you want to test something feels like an anti-pattern. At least from a Java perspective, that could generate a lot of files which forces you to maintain some sort of mental record of what they all do.

That said, I agree with the sentiment. I just don’t think it’s always the best course of action.