Click here to Skip to main content
15,913,773 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Winner Pin
Michael Martin6-Oct-14 21:27
professionalMichael Martin6-Oct-14 21:27 
GeneralI like unit testing and debugging private methods so u$ sucks today Pin
Ernst Iliov Stavro Blofeld6-Oct-14 11:52
Ernst Iliov Stavro Blofeld6-Oct-14 11:52 
GeneralRe: I like unit testing and debugging private methods so u$ sucks today PinPopular
CDP18026-Oct-14 12:07
CDP18026-Oct-14 12:07 
GeneralRe: I like unit testing and debugging private methods so u$ sucks today Pin
Jörgen Andersson6-Oct-14 18:55
professionalJörgen Andersson6-Oct-14 18:55 
GeneralRe: I like unit testing and debugging private methods so u$ sucks today Pin
Agent__0076-Oct-14 19:12
professionalAgent__0076-Oct-14 19:12 
GeneralRe: I like unit testing and debugging private methods so u$ sucks today Pin
_Maxxx_6-Oct-14 19:34
professional_Maxxx_6-Oct-14 19:34 
GeneralRe: I like unit testing and debugging private methods so u$ sucks today Pin
Marc Clifton6-Oct-14 15:18
mvaMarc Clifton6-Oct-14 15:18 
GeneralRe: I like unit testing and debugging private methods so u$ sucks today Pin
_Maxxx_6-Oct-14 15:47
professional_Maxxx_6-Oct-14 15:47 
But Shirley in almost all cases, once developed, one doesn't care what the results of a private method are - one only cares what the results of public methods are.

If a public method calls zero or more private methods to produce an outcome, changes to any of those private methods don't matter, as long as the results of the public method remain unchanged.

What's the point of testing a private method that is used by a public method? It just means the private method gets tested twice.

Although... if the private method accesses (e.g.) the database and so needs to be mocked, then it never gets tested - but then should one test such methods at all in a TDD environment (as it involves setting up and tearing down a whole database)...

** I'm not particularly arguing for one case or the other - more asking out of my poor understanding of TDD, which I'm not really practising in my current role.
PooperPig - Coming Soon

GeneralRe: I like unit testing and debugging private methods so u$ sucks today Pin
Marc Clifton6-Oct-14 16:21
mvaMarc Clifton6-Oct-14 16:21 
GeneralRe: I like unit testing and debugging private methods so u$ sucks today Pin
_Maxxx_6-Oct-14 18:09
professional_Maxxx_6-Oct-14 18:09 
GeneralRe: I like unit testing and debugging private methods so u$ sucks today Pin
Super Lloyd6-Oct-14 18:07
Super Lloyd6-Oct-14 18:07 
GeneralRe: I like unit testing and debugging private methods so u$ sucks today Pin
Marc Clifton7-Oct-14 2:26
mvaMarc Clifton7-Oct-14 2:26 
GeneralRe: I like unit testing and debugging private methods so u$ sucks today Pin
Nicholas Marty6-Oct-14 23:59
professionalNicholas Marty6-Oct-14 23:59 
GeneralRe: I like unit testing and debugging private methods so u$ sucks today Pin
peterchen7-Oct-14 0:32
peterchen7-Oct-14 0:32 
RantPHP PinPopular
Marc Clifton6-Oct-14 9:48
mvaMarc Clifton6-Oct-14 9:48 
GeneralRe: PHP Pin
CDP18026-Oct-14 9:54
CDP18026-Oct-14 9:54 
GeneralRe: PHP Pin
Afzaal Ahmad Zeeshan6-Oct-14 9:58
professionalAfzaal Ahmad Zeeshan6-Oct-14 9:58 
GeneralRe: PHP Pin
Marc Clifton6-Oct-14 10:13
mvaMarc Clifton6-Oct-14 10:13 
GeneralRe: PHP Pin
Jeremy Falcon6-Oct-14 11:24
professionalJeremy Falcon6-Oct-14 11:24 
GeneralRe: PHP Pin
Chris Maunder6-Oct-14 10:07
cofounderChris Maunder6-Oct-14 10:07 
GeneralRe: PHP Pin
Marc Clifton6-Oct-14 10:16
mvaMarc Clifton6-Oct-14 10:16 
GeneralRe: PHP PinPopular
Roger Wright6-Oct-14 10:13
professionalRoger Wright6-Oct-14 10:13 
GeneralRe: PHP Pin
CDP18026-Oct-14 10:16
CDP18026-Oct-14 10:16 
GeneralRe: PHP Pin
Jeremy Falcon6-Oct-14 10:32
professionalJeremy Falcon6-Oct-14 10:32 
GeneralRe: PHP Pin
Jeremy Falcon6-Oct-14 10:24
professionalJeremy Falcon6-Oct-14 10:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.