Skip to content

Comment on The Best Code Documentation ‘Tool’ Ever Madeparent

Comments

I only test against the final result, that I expect any public method to produce. The unit test should pay no consideration to the implementation details such as private methods.

If you want to test the fragments in isolation, split it out into a separate class that you use as a dependency. Your desire to do so is often a good indication that you should split up the responsibility.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.