ploeh blog

Mark Seemann's discontinued .NET blog.

Browse by Tags

Tagged Content List
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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: ...
  • Blog Post: 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 service...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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 just developed...
  • Blog Post: 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>...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: Unit Testing Duplex WCF Clients

    In my previous post , I explained how to unit test a WCF service with callbacks. Since the scenario involves duplex communication, the service is also a client, and vice versa, so it's only reasonable to look at the 'client' as well, to examine how to best approach unit testing such a beast. Since...
  • Blog Post: Unit Testing Duplex WCF Services

    One of my readers recently asked me about unit testing WCF services when they have callbacks. Given that I strongly believe that you should attempt to implement your services without referencing WCF at all , but duplex WCF services require you to get the callback instance from OperationContext.Current...
  • Blog Post: Modifying Behavior of WCF-Free Service Implementations

    In my previous post , I explained how to implement a WCF service without referencing WCF. In simple cases, it works as described, but you may soon find yourself in a situation where you need to modify the behavior of the service when it's hosted by WCF. Perhaps you need to control the service's ConcurrencyMode...
  • Blog Post: Implementing WCF Services Without Referencing WCF

    More than a year ago, I wrote my first post on unit testing WCF services . One of my points back then was that you have to be careful that the service implementation doesn't use any of the services provided by the WCF runtime environment (if you want to keep the service testable). As soon as you invoke...
  • Blog Post: Declarative Use of Custom SecurityTokenParameters

    It's not the first time I've stated this, but one of the reasons I love WCF is that it's so wonderfully extensible. You can even implement your own custom security token, as this article explains . The only problem with this article is that it uses imperative code to create a custom Binding, and it doesn...
  • Blog Post: Why Federation Matters

    Ayende recently griped about the complexity of Federation and WCF . While I hope I have already communicated my (partial) consent, as well as some additional remarks on the cause of this in the comments, a comment by s ig prompted me to write this post as a response. Here's the relevant part of the quote...
  • Blog Post: Troubleshooting WCF In Production Environments

    WCF is such a nice framework, and its diagnostics capabilities are really comprehensive. Really, I only have two (pseudo-)issues with diagnostics so far: Configuring diagnostics is pretty difficult to do (lots of XML editing involved) Reading trace and message logs is hard. By default, it's...
  • Blog Post: Authorizing Services

    If you look at the default authorization model for WCF, you will notice that it expects you to implement centralized authorization. While centralized and pluggable authentication makes a lot of sense to me, that's not the case with authorization. Does it really make sense to decouple authorization...
  • Blog Post: Mapping SAML Tokens to IPrincipals

    In my post about integration testing of WCF services , I briefly touched on the topic of authorization managers and the desirability of separation of concerns. When working with user identity, it's important to place authentication and authorization logic in the right places, but it's not always the...
  • Blog Post: Integration Testing WCF Services

    In my previous post about unit testing WCF services , I hinted at the need to perform integration testing of services as well. As Jimmy writes , you should still place your logic involving OperationContext in the Service Interface Layer (SIL): In many cases, you need to know something about the context...
  • Blog Post: Unit Testing WCF Services

    A few years ago, when ASP.NET web services were the only (or at least most common) implementation of web services on the Microsoft platform, you couldn't really unit test services. Obviously, since you had programmatic access (via a proxy class) to the service, you could write tests against the service...
Page 1 of 1 (21 items)