October just ended but I still want to shine a light on new and improved software that were released this month: nDepend v5.0 In the beginning of this month a new version of this great tool was released with a lot of new features that makes this tool even better. If you don’t know what … Continue reading Software news – October 2013
Tag: .NET
How to write a unit test
Last week I had the pleasure of participating in Sela Developer Practice. Before my session I sat through Gil ZIlberfeld’s session “7 steps for writing your first unit test” and I found myself thinking – what are steps I take when writing a new unit test?I’ve been writing them for so long and never noticed … Continue reading How to write a unit test
Sela Developer Practice 2013
I’m speaking at SDP2013 – two weeks from now. I’ll be talking about mocking (surprise!) in “Battle of the Mocking Frameworks”. So if you’re happen to come to the conference on May 7th – drop by and say hi. Until then – happy coding…
Unit testing multi threaded code–Timers
Writing unit tests for multi-threaded is not simple and could even be impossible for some scenarios – how could you test that an asynchronous method was not called?Since most unit testing examples tend to be rather trivial I’ve decided to try and explain other more complex scenarios – preferably without using any calculator examples.The “Timer” … Continue reading Unit testing multi threaded code–Timers
Things I learnt reading C# specifications (#1)
After reading Jon Skeet’s excellent C# in Depth - again (3rd edition - to be published soon) I’ve decide to try and actually read the C# language specification…Being a sensible kind of guy I’ve decided to purchase the annotated version which only cover topics up to .NET 4 – but has priceless comments from several … Continue reading Things I learnt reading C# specifications (#1)
Fluent interfaces in C# – Generics
If you haven’t read the previous posts on the subject of fluent interfaces using C# – I suggest you do so now – I’ll wait…Introduction Extension Methods Method Chaining Great! now you’re all ready for the forth post on the subject of using Generics:Generics were added to version 2.0 of the C# language and the … Continue reading Fluent interfaces in C# – Generics
nCrunch review – TDD on steroids
Any project that uses unit tests gets to the stage where running all of the tests takes a lot of time. Even if you manage to keep your test suite in a manageable size From time to time a developer would “forget” to run all the tests before commit and break the build. One solution … Continue reading nCrunch review – TDD on steroids
Serialization and events in C#
Today I had an interesting problem:I was trying to serialize and object using BinaryFormatter but it kept on failing because some class was not Serializable. I’ve double and triple checked my class and all of it’s inner properties and verified that indeed they were marked correctly.The ProblemLooking closer at the exception I’ve noticed something – … Continue reading Serialization and events in C#
Making string based method strongly typed
I can't believe they implemented this way – was the first thought on my mind…The method in question is part of the new(er) NUnit’s constraint based model specifically the one used to assert a property value.Before we dive deeper a few words on the constraint based model:constraint based modelMost unit testing framework have similar way … Continue reading Making string based method strongly typed
Fluent interfaces in C# – method chaining
For those of you who just tuned in, this is a third post on the subject of fluent interfaces using C#. In case you haven’t read them before – here are my previous posts on the subject:IntroductionExtension MethodsRight, now that we’re familiar with fluent interfaces it’s time to move to “Method Chaining”.Method chaining is the … Continue reading Fluent interfaces in C# – method chaining

