Skip to main content
25 events
when toggle format what by license comment
Apr 13, 2022 at 17:18 comment added Thorbjørn Ravn Andersen Private methods are not part of the API and therefore not intended to be tested outside the code itself.
Apr 13, 2022 at 15:04 answer added Samir Bellouti timeline score: -1
Oct 28, 2018 at 3:01 history tweeted twitter.com/StackSoftEng/status/1056380426271576069
S Oct 22, 2018 at 15:30 history suggested d219 CC BY-SA 4.0
Minor grammar corrections
Oct 22, 2018 at 15:28 review Suggested edits
S Oct 22, 2018 at 15:30
Oct 22, 2018 at 15:26 comment added Robert Harvey @SergeBallesta: NP.
Oct 22, 2018 at 15:05 history edited Robert Harvey CC BY-SA 4.0
deleted 268 characters in body
Oct 22, 2018 at 13:31 comment added Serge Ballesta ... I also know that it is always possible to write high quality code without following the most common practices. It is simply more disturbing for other maintainers/developpers if they want/have to fix, use or add new features to that code.
Oct 22, 2018 at 13:29 comment added Serge Ballesta @Laiv: I'm old enough to know that rules are to be broken when we come to a special use case. And I also know that the most accepted rules can change over time. But when I find myself following what seems to be often seen as an anti-pattern with no special reason, I prefere to have a break and ask about it. I still have questions for my own use case. But at least I now better understand why iceberg classes will be harder to maintain because of a higher risk of side effect on a minor (or far) refactoring....
Oct 22, 2018 at 13:01 comment added Laiv Just an advice. Critical thinking. Don't blindly believe everything you read, just because it was written in S.E and a bunch of unknown persons agreed with upvote the same answer. Even here, would be good some references to the S.O questions you are referring to. They will bring some "context" to your beliefs.
Oct 22, 2018 at 12:30 comment added Serge Ballesta @Laiv: almost all the answers to that question say that. And stack exchange is one of my favourite references...
Oct 22, 2018 at 12:13 comment added Laiv @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.
Oct 22, 2018 at 11:45 history edited Serge Ballesta CC BY-SA 4.0
added 270 characters in body
Oct 22, 2018 at 8:15 vote accept Serge Ballesta
Oct 22, 2018 at 7:57 comment added John Wu 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.
Oct 22, 2018 at 7:41 comment added Serge Ballesta @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...
Oct 20, 2018 at 0:49 answer added Juan Carlos Eduardo Romaina Ac timeline score: 4
Oct 19, 2018 at 20:43 answer added Matt Messersmith timeline score: 46
Oct 19, 2018 at 20:34 comment added John Wu 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.
Oct 19, 2018 at 18:31 answer added Robert Andrzejuk timeline score: 7
Oct 19, 2018 at 15:54 answer added Robert Harvey timeline score: 17
Oct 19, 2018 at 15:52 answer added Pete timeline score: 28
Oct 19, 2018 at 15:40 review Close votes
Oct 28, 2018 at 3:01
Oct 19, 2018 at 15:26 comment added Greg Burghardt Possible duplicate of Testing private methods as protected
Oct 19, 2018 at 15:20 history asked Serge Ballesta CC BY-SA 4.0