Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • 2
    Possible duplicate of Testing private methods as protected Commented Oct 19, 2018 at 15:26
  • 3
    OP, where did you hear or read that testing of private methods was considered "bad"? There are different ways to unit test. See Unit testing, Black-box testing and White-box testing. Commented Oct 19, 2018 at 20:34
  • @JohnWu: I know the difference between White-box and Black-box testing. But even in White-box testing it looks like the need to test private methods is a hint for a design problem. My question is an attempt to understand what are the best paths when I fall there... Commented Oct 22, 2018 at 7:41
  • 2
    Again, where did you hear or read that even in White-box testing the need to test private methods is a hint for a design problem? I would like to understand the reasoning behind that belief before attempting an answer. Commented Oct 22, 2018 at 7:57
  • @SergeBallesta in other words, put some references to those articles that made you believe that testing private methods is a bad practice. Then explain to us why did you believe them. Commented Oct 22, 2018 at 12:13