So... I am an avid Test Driven Development/Unit Test/Behavior Driven Development guy. I've been gravitating towards Behavior Driven Development lately and honestly I don't Dependency Inject everything. Really if I'm just Behavior Driven Develop-ing a layer I just need to inject the fringe dependencies, the things that would cause me to be dependent on other whole systems or sub-systems (think File Input/Output, Active Directory, Web Services, etcetera). My object still contains a lot of state.
I think saying that unit tests cause us to reinvent functional programming is a bit of a stretch. I do think that saying that unit testing causes us to write better code and we borrow heavily from many programming paradigms (Design By Contract, Functional Programming, Object Oriented Programming, Domain Specific Languages, etcetera) in order to write that better code.
I think saying that unit tests cause us to reinvent functional programming is a bit of a stretch. I do think that saying that unit testing causes us to write better code and we borrow heavily from many programming paradigms (Design By Contract, Functional Programming, Object Oriented Programming, Domain Specific Languages, etcetera) in order to write that better code.
:)