Tests should explain something

I sometimes see unit tests which are downright confusingly opaque. Being a unit test, they are testing some smallish piece of code. Unfortunately by the time I finish reading the test I am none the wiser for what the importance of the code in question is, and what role it is meant to play in…

0

Is IQueryable poisoning your interfaces?

Thanks indirectly to a comment on my previous post, today I read ‘IQueryable is tight coupling’ (disclaimer: his words). I feel like it contains an interesting mixture of truth and panic, and makes a fine discussion topic. The main interesting truth he mentions is: nobody implements IQueryable fully! Yes! If you’ve used an ORM, you’ve…

2

Revisiting – how to make your EF queries testable

So, some time back I spent some time agonizing around testability of code which has to talk to a database. I now think I have found a somewhat reasonable answer, which assumes that you are using some kind of LINQ query relational database mapper like EntityFramework which my samples are based on. It has these…

4