ploeh blog

Mark Seemann's discontinued .NET blog.

Blog - About

About ploeh blog

Mark Seemann was a software development engineer working for Microsoft in Copenhagen, Denmark. This was his (professional) blog. Please visit the current ploeh blog instead.

All postings are provided "AS IS" with no warranties, and confer no rights. Any opinions expressed in this blog are solely those of the author and not official positions of Microsoft Corporation.

  • ploeh blog

    ploeh blog Is Moving

    • 0 Comments
    After three years on MSDN blogs, I'll be moving my blog to http://blog.ploeh.dk . 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 .
  • ploeh blog

    Faking The Windows Azure Table Service

    • 1 Comments
    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...
  • ploeh blog

    A General-Purpose Fake ADO.NET Data Service

    • 2 Comments
    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...
  • ploeh blog

    Creating A Fake ADO.NET Data Service

    • 1 Comments
    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...
  • ploeh blog

    Unit Testing ADO.NET Data Service Clients

    • 4 Comments
    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...
  • ploeh blog

    Unit Testing ADO.NET Data Services

    • 4 Comments
    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...
  • ploeh blog

    Test-Driven Properties

    • 1 Comments
    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...
  • ploeh blog

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

    • 6 Comments
    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...
  • ploeh blog

    Assert Messages Are Not Optional

    • 5 Comments
    ...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,...
  • ploeh blog

    First Dynamics Mobile Post

    • 0 Comments
    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...
  • ploeh blog

    Why Use AreEqual<T>?

    • 1 Comments
    This is a post in my Zero-Friction TDD series. One of my colleagues recently asked my why I prefer Assert.AreEqual<T> over one of the non-generic Assert.AreEqual overloads for primitive types. In most cases, I'm very happy with the C# compiler...
  • ploeh blog

    3 Is Many

    • 2 Comments
    This is an installment in my Zero-Friction TDD series. When I was a kid, my parents taught me that many is any number above three two*; they used the simple counting sequence one, two, many . This little story may make me seem like I was an incredibly...
  • ploeh blog

    Creating Azure Tables From Script

    • 4 Comments
    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...
  • ploeh blog

    testmethod Code Snippet

    • 2 Comments
    This is an installment in my Zero-Friction TDD series. If you are a regular reader of this blog, you may have noticed a certain pattern in my unit test examples (like this one ). This is because I always follow the Four-Phase Test pattern (which is...
  • ploeh blog

    Ignore Irrelevant Return Values

    • 1 Comments
    This is an installment in my Zero-Friction TDD series. Sometimes, you don't care about the return value from a particular operation. The simplest example is if you want to check that creating a new instance of a specific type will throw an exception...
  • ploeh blog

    Microsoft Dynamics Mobile 1.5 Released

    • 0 Comments
    If you are wondering about what I'm doing these days, we (the Microsoft Dynamics Mobile Team ) just released a new version of Microsoft Dynamics Mobile ! And there was much rejoicing :)
  • ploeh blog

    Anonymous Variables

    • 7 Comments
    This post is an installment in my series on Zero-Friction TDD . Often when writing a unit test, the SUT 's API will force you to create objects that you really don't care about. As an example, take a look at the signature of this constructor: public...
  • ploeh blog

    Naming Direct Output Variables

    • 3 Comments
    In my series of Zero-Friction TDD tips and tricks, it's time to look at naming Direct Output variables. [ TestMethod ] public void DoStuffWillReturnMessage() { // Fixture setup string expectedResult = "ploeh" ; MyClass sut = new MyClass (); // Exercise...
  • ploeh blog

    Zero-Friction TDD

    • 9 Comments
    Writing good code is difficult. Unit tests are written as code, so a corollary to the first sentence is that writing good unit tests is also difficult. TDD (particularly if you interpret the last D as Design ) carries this challenge in abundance, since...
  • ploeh blog

    Assert.Throws

    • 4 Comments
    xUnit.net provides the Assert.Throws method for testing exceptions, instead of the ExpectedException attribute. In his original announcement , James Newkirk explains why this is a much better approach, and I can only agree. However, those of us that for...
  • ploeh blog

    At PDC

    • 0 Comments
    I'm currently at PDC in Los Angeles, so if you are here as well, take a moment to say hello if you see me :)
  • ploeh blog

    UAC Privileges Flow Across WCF Boundaries

    • 2 Comments
    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...
  • ploeh blog

    Naming SUT Test Variables

    • 6 Comments
    If you are a regular reader of this blog, you may have noticed that for the last couple of months, every test I've posted has shared some similarities; one of which is that I always name my SUT test variable sut . Here's a simple example: [ TestMethod...
  • ploeh blog

    Testing Against the Real Event Log

    • 6 Comments
    Lots of applications write to the Windows Event Log. When TDD'ing, event logging is part of an application's Indirect Output , so to verify that logging happens correctly, you need to verify the test against an Observation Point . As always, the correct...
  • ploeh blog

    SqlExpressDatabaseInstaller

    • 0 Comments
    When unit testing data access components, I prefer to test against run-time components that match the target environment as closely as possible. In other words, if the data access component targets SQL Server 2008, I prefer to test against a SQL Server...
Page 1 of 6 (132 items) 12345»