ploeh blog Is Moving

After three years on MSDN blogs, I’ll be moving my blog to Why? Read the answer here. This is most likely the last post on this blog, so if you’d like to stay tuned, please go and subscribe to the new blog.


Faking The Windows Azure Table Service

When presented with a new technology, one of my primary evaluation criteria is its testability, so it should come as no surprise to the regular reader of this blog that this was also foremost in my mind when Windows Azure was presented at PDC. Much of the Azure Services Platform is just .NET, so testability…


A General-Purpose Fake ADO.NET Data Service

In my previous post, I discussed how to implement a Fake ADO.NET Data Service for use with unit testing, showing how you can develop a one-off service that addresses specific needs, such as querying parents and children in the example. As I hinted in that post, it’s possible to create a reusable Fake ADO.NET Data…


Creating A Fake ADO.NET Data Service

Previously, I discussed unit testing ADO.NET Data Service clients using a Fake ADO.NET Data Service, and I promised to demonstrate how to create such a service. In this article I will continue the previous example and implement the Fake MyService class. The basics of MyService is pretty simple: public partial class MyService{    public MyService()    {       …


Unit Testing ADO.NET Data Service Clients

In my previous post, I discussed unit testing ADO.NET Data Services and how you can host and test the service itself. In this post, I’ll take a look at the opposite scenario: You have a client of an ADO.NET Data Service, and you want to unit test the client without relying on the real, production…


Unit Testing ADO.NET Data Services

ADO.NET Data Services enables you to expose data (including, but not limited to, relational data) as REST services. Since it’s built on top of WCF, it can be tested utilizing similar techniques, but allow me to elaborate a bit on the subject. As with WCF, you might be interested in testing one or both tiers:…


Test-Driven Properties

Zero-Friction TDD post #10: In principle, defining properties (or fields, for that matter) while TDD’ing should be no different than defining methods. Again, the important part is to stay focused on the test at hand, and not become bogged down by implementation details. Unfortunately, neither Visual Studio 2005 nor 2008 has a Generate property stub…


Use The Generate Method Stub Smart Tag To Stay In The Zone

Yet Another Zero-Friction TDD Article (YAZFTA): When writing unit tests in the TDD fashion, it’s important to stay in the zone and not get side-tracked by irrelevant issues. You need to avoid what I call mental context switching. Focus on writing the test and postpone all else to later, but make sure that you do…


Assert Messages Are Not Optional

…and now, in this week’s episode of Zero-Friction TDD: Optional Assert messages that aren’t optional anyway! Actually, this piece of advice comes almost directly from the xUnit Test Patterns book, so I was in doubt whether I should post it all, but it bears repeating, and I guess I still have a few things to…


First Dynamics Mobile Post

Yesterday, I posted my first post over on the Microsoft Dynamics Mobile Team blog. More are likely to follow. In case you are wondering what this means for this blog, the answer is: Nothing. I plan to continue blogging in more or less the same vein as I’ve done for the last three years now.