Click here to Skip to main content
15,887,776 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.

 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
TNCaver27-Jan-22 9:57
TNCaver27-Jan-22 9:57 
GeneralRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
MarkTJohnson27-Jan-22 10:29
professionalMarkTJohnson27-Jan-22 10:29 
GeneralRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
Ravi Bhavnani27-Jan-22 10:47
professionalRavi Bhavnani27-Jan-22 10:47 
GeneralRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
lmoelleb27-Jan-22 20:59
lmoelleb27-Jan-22 20:59 
GeneralRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
TNCaver28-Jan-22 6:07
TNCaver28-Jan-22 6:07 
GeneralRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
lmoelleb29-Jan-22 4:52
lmoelleb29-Jan-22 4:52 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
Ravi Bhavnani27-Jan-22 10:44
professionalRavi Bhavnani27-Jan-22 10:44 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
r_hyde27-Jan-22 10:46
r_hyde27-Jan-22 10:46 
What you're doing, at least in the example you've given, is not too far off from the way the "cool kids" are doing unit testing. You're doing the whole AAA thing (arrange, act, assert), you've just bundled all of your test cases into a monolithic block. Since each assertion in your example depends on the outcome of exactly one action, and no action depends on the outcome of any other action, this could be made to fit into the modern unit testing box very easily by just breaking it up into a method-per-test structure, but I couldn't really make a strong case for why you should bother. Things might change if the code under test isn't quite as simple as in your example though, for example if there are dependencies that need to be mocked/stubbed.
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
Mycroft Holmes27-Jan-22 11:31
professionalMycroft Holmes27-Jan-22 11:31 
GeneralRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
lmoelleb27-Jan-22 20:48
lmoelleb27-Jan-22 20:48 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
Gary R. Wheeler27-Jan-22 15:31
Gary R. Wheeler27-Jan-22 15:31 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
ZevSpitz27-Jan-22 21:25
professionalZevSpitz27-Jan-22 21:25 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
RustyF27-Jan-22 21:24
RustyF27-Jan-22 21:24 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
lmoelleb27-Jan-22 21:07
lmoelleb27-Jan-22 21:07 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
Davyd McColl27-Jan-22 21:48
Davyd McColl27-Jan-22 21:48 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
#realJSOP27-Jan-22 23:42
mve#realJSOP27-Jan-22 23:42 
JokeRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
Sander Rossel27-Jan-22 23:48
professionalSander Rossel27-Jan-22 23:48 
GeneralRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
OriginalGriff28-Jan-22 0:20
mveOriginalGriff28-Jan-22 0:20 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
Cpichols28-Jan-22 1:24
Cpichols28-Jan-22 1:24 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
Member 1484049628-Jan-22 1:53
Member 1484049628-Jan-22 1:53 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
Peter Kelley 202128-Jan-22 3:17
Peter Kelley 202128-Jan-22 3:17 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
Jeroen_R28-Jan-22 3:40
Jeroen_R28-Jan-22 3:40 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
Matt Bond28-Jan-22 4:55
Matt Bond28-Jan-22 4:55 
AnswerRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
Bruce Greene28-Jan-22 5:39
Bruce Greene28-Jan-22 5:39 
GeneralRe: I'm fairly old fashioned at times ... but should I embrace unit testing? Pin
Matt McGuire28-Jan-22 6:14
professionalMatt McGuire28-Jan-22 6:14 

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.