Daniel Cazzulino's Blog
-
Where was the stubbing part in Moq?
In my very recent previous post I said "mocking and stubbing easier than ever", but actually forgot to mention the stubbing part :S.
-
Mocking and stubbing easier than ever with Moq 2.6
I've just released a new version of Moq which contains a few bug fixes but two extremely useful features: recursive mocks and mocked default values.
-
What is all the fuzz about the new common IServiceLocator
There's been some excitement lately about the introduction of a common IServiceLocator that all major DI containers apparently will provide.
-
Developing orientation and resolution aware Windows Mobile applications just got a TON easier
Quite some time ago I posted about how we (Clarius Consulting with Microsoft Patterns & Practices) solved the multiple resolution/orientation problem for Windows Mobile developers by introducing the Orientation Aware Control (OAC) as part of the Mobile Client Software Factory. As any 6-month project, there were a number of features that had to be left out because of time constraints. Also, being two years old also shows: that version does not support smartphone project types, neither Windows Mobile 6, nor VS2008, etc. A few bugs were also discovered after being released....
-
How to get ASP.NET MVC Preview 4 to run with .NET SP1
As you probably know by now (i.e. from Phill's blog), however both Routing and Abstractions are. MVC Preview 4, however, has its own version of both assemblies.
-
How to diagnose Linq to SQL easily and production-ready
Here's what we're currently doing: we add an InitializeContext method to all DataContext-derived classes, which is called from all ctors:
-
Does CUIL search engine really work?
Query: "how to replace ipod touch boot screen"
Cuil: 1 result, completely unrelated to what I'm looking for
Google: 140k results, including the one I was looking for in the first 10
MS Live: 423k results, the actual answer nowhere to be found in the first 40 results (so, for practical purposes I guess it's the same as Cuil useless result too :)) -
The need for nullable reference types to advertise optional constructor dependencies
In "traditional" OOP, you advertise your class required dependencies via constructor arguments:
-
Do you really care about Stub vs Mock?
I've argued in the past that this theoretical discussion is utterly useless. In my experience you need slightly different things from your test doubles at different times and depending on the scenarios and what you care about testing in a particular test.
-
Mocking protected members with Moq
If you're familiar with Moq, you know that it relies on lambda expressions heavily. This is very good as you get full support from intellisense and refactoring features in Visual Studio. However, it also means you're for the most part restricted to setting expectations on things that your code has access too (public or internal members).