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

 
GeneralAn important page in history ... PinPopular
Amarnath S11-Feb-15 18:32
professionalAmarnath S11-Feb-15 18:32 
GeneralRe: An important page in history ... PinPopular
DJ van Wyk11-Feb-15 19:57
professionalDJ van Wyk11-Feb-15 19:57 
GeneralRe: An important page in history ... Pin
Mark_Wallace11-Feb-15 23:22
Mark_Wallace11-Feb-15 23:22 
QuestionWhen to use dependency injection? Pin
Super Lloyd11-Feb-15 14:28
Super Lloyd11-Feb-15 14:28 
AnswerRe: When to use dependency injection? Pin
Gary R. Wheeler11-Feb-15 14:50
Gary R. Wheeler11-Feb-15 14:50 
JokeRe: When to use dependency injection? Pin
Super Lloyd11-Feb-15 14:57
Super Lloyd11-Feb-15 14:57 
AnswerRe: When to use dependency injection? Pin
Brisingr Aerowing11-Feb-15 15:00
professionalBrisingr Aerowing11-Feb-15 15:00 
AnswerRe: When to use dependency injection? Pin
al13n11-Feb-15 15:20
al13n11-Feb-15 15:20 
While INowResolver seems like overkill, sometimes tests need to fix the time to get reproducible behavior. I find using the registry is similar, as are really any external data stores or sources of info, ie random numbers too.

Unit tests should never rely on external input to work correctly. MUCH easier said than done.

So I get it, and I also get where you're coming from. It's certainly a shock to the system when you're used to the ease of static methods.

Good luck with it!
GeneralRe: When to use dependency injection? Pin
Super Lloyd11-Feb-15 15:59
Super Lloyd11-Feb-15 15:59 
GeneralRe: When to use dependency injection? Pin
Chad3F15-Feb-15 15:07
Chad3F15-Feb-15 15:07 
AnswerRe: When to use dependency injection? Pin
tgrt11-Feb-15 17:08
tgrt11-Feb-15 17:08 
GeneralRe: When to use dependency injection? Pin
Super Lloyd11-Feb-15 18:14
Super Lloyd11-Feb-15 18:14 
AnswerRe: When to use dependency injection? Pin
Erik Funkenbusch11-Feb-15 18:37
Erik Funkenbusch11-Feb-15 18:37 
GeneralRe: When to use dependency injection? Pin
Super Lloyd11-Feb-15 18:50
Super Lloyd11-Feb-15 18:50 
AnswerRe: When to use dependency injection? Pin
Dominic Burford11-Feb-15 21:14
professionalDominic Burford11-Feb-15 21:14 
GeneralRe: When to use dependency injection? Pin
Super Lloyd11-Feb-15 21:38
Super Lloyd11-Feb-15 21:38 
GeneralRe: When to use dependency injection? Pin
Dominic Burford11-Feb-15 23:09
professionalDominic Burford11-Feb-15 23:09 
GeneralRe: When to use dependency injection? Pin
jschell13-Feb-15 12:34
jschell13-Feb-15 12:34 
GeneralRe: When to use dependency injection? Pin
jschell13-Feb-15 12:29
jschell13-Feb-15 12:29 
AnswerRe: When to use dependency injection? Pin
Rob Philpott11-Feb-15 23:06
Rob Philpott11-Feb-15 23:06 
AnswerRe: When to use dependency injection? Pin
Mark_Wallace11-Feb-15 23:27
Mark_Wallace11-Feb-15 23:27 
AnswerRe: When to use dependency injection? PinPopular
Chris Maunder12-Feb-15 3:37
cofounderChris Maunder12-Feb-15 3:37 
AnswerRe: When to use dependency injection? Pin
MCMickJ1913-Feb-15 3:12
MCMickJ1913-Feb-15 3:12 
AnswerRe: When to use dependency injection? Pin
Ed K13-Feb-15 8:04
Ed K13-Feb-15 8:04 
GeneralRe: When to use dependency injection? Pin
Super Lloyd13-Feb-15 19:52
Super Lloyd13-Feb-15 19:52 

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.