Dennis van der Stelt

The only way to win is to learn faster than anyone else

Community

Email Notifications

News

  • Addicted to Refactor! Pro

I read...

I Use...

Tags

Recent Posts

Archives

Blog Subscription Form

  • Email Notifications
    Go

Browse by Tags

All Tags » Testing (RSS)
How to unit test a method that has void as return type
How do I test a method that returns void? For example a method like this. public void Process(int leadId) { decimal price = _calculator.CalculateNormalLead(leadId); Lead lead = new Lead(leadId, price); _leadRepository.Save(lead); } How to test what the...
Value of Unit testing
There are probably uncountable amount of articles, posts and arguments on to why Unit Testing is so valuable. I just found a nice example that would’ve (or at least should’ve) been caught using Unit Tests. The following code was a bit adjusted to the...
Asserting private objects with unit testing
There’s a lot of discussion going on about designing for testability. One of the problems of unit testing your code is that you might want to insert a fake object (like a stub or mock ) so that your code under test won’t actually call out to the database...