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…

1

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…

2

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()    {       …

1

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…

4

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:…

4

Creating Azure Tables From Script

When working with the Windows Azure Storage service, you must create the tables before you can use them; in essence, defining the ‘schema’ of your Azure storage service. On his blog, Steve Marx writes: “Probably the best solution is to have separate initialization code that creates your tables.  This is analogous to the pattern of…

4

UAC Privileges Flow Across WCF Boundaries

Today, I just spent an entire afternoon troubleshooting a problem in one of my WCF services. When the solution finally dawned on me, it was so simple that I wanted to kick myself, so I thought that by sharing my experience, I might spare you the agony. In short, the setup was this: I had…

2

N-Tier Synchronization With The Sync Framework And WCF ChannelFactory (Part 2)

In my previous post, I discussed using ServerSyncProviderProxy with ChannelFactory<T>, and explained how you can get up and running with that combination. While the described modification is definitely necessary, there’s at least one other caveat that I’ve encountered so far. ChannelFactory<T> implements both ICommunicationObject and IDisposable, and it’s necessary to properly close an instance. A…

2

N-Tier Synchronization With The Sync Framework And WCF ChannelFactory (Part 1)

Sync Services for ADO.NET 2.0 allows a proper n-tier architecture where you can synchronize a client with a back-end data store via a web service. To do this, your web service must expose a simple interface consisting of four operations. As described in the documentation, one of these operations must have the following signature: [OperationContract]SyncSchema…

2

An Overview of Unit Testing Duplex WCF Services and Clients

In the last couple of posts, I’ve demonstrated how to isolate implementation from WCF contract definition and behavior in a duplex communication scenario. These posts have been rather detailed, so it occurred to me that you might benefit from an overview. The main goal was to ensure testability of implementations of both service and client….

4