To even write unit tests effectively you need to write your code in a certain differently.
In C# this normally means using IOC + DI.
Also almost nobody I know does proper TDD. I know it is very convincing when one of the TDD evangelists shows you how to write something like a method to work out the nth number in a fibonacci sequence using nothing but just writing tests.
In reality most 95% of developers that even write tests write the logic and write the test afterwards to check the logic does what it should.
>To even write unit tests effectively you need to write your code in a certain differently.
>In C# this normally means using IOC + DI.
I've become quite partial to functional programming in the last few years. Side effect free functions with functions as interfaces for DI lend themselves perfectly to TDD and data parallel async without worrying too much.
C# is now slowly taking over most of the good features from F#, but I think the culture won't transform so easily.
In C# this normally means using IOC + DI.
Also almost nobody I know does proper TDD. I know it is very convincing when one of the TDD evangelists shows you how to write something like a method to work out the nth number in a fibonacci sequence using nothing but just writing tests.
In reality most 95% of developers that even write tests write the logic and write the test afterwards to check the logic does what it should.