ploeh blog

Mark Seemann's discontinued .NET blog.

Browse by Tags

Tagged Content List
  • Blog Post: SqlExpressDatabaseInstaller

    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 2008 database. In a number of earlier posts , I...
  • Blog Post: SqlScriptListInstaller

    The last of a series of SQL Server-related database Installers is a little helper that simply makes it easier to bundle several SQL scripts together as part of a single Installer package. Instead of mixing several SqlScriptInstallers together with other Installers, you can group them together in a single...
  • Blog Post: SqlScriptInstaller

    In my previous post I described a general-purpose Installer that can be used to create a SQL Server database during installation (and delete it again during uninstallation). As promised, this post picks up where the other stopped to describe another Installer that can execute arbitrary T-SQL scripts...
  • Blog Post: SqlDatabaseInstaller

    Installers provide a consistent way of implementing automated setup logic for an application, and as I previously wrote, they also work admirably well for setting up test fixtures . The BCL, however, only contains a limited amount of pre-built Installers, so if you need to install something else than...
  • Blog Post: Reasons For Isolation

    Object-oriented applications above some level of complexity are almost always modelled as a layered architecture. While the typical three-layer architecture remains the most widely known, n-layer architecture is also often utilized. Here's a typical design almost anyone can create (in Visio or Power...
  • Blog Post: Unit Testing Activity CodeDOM Serializers

    Windows Workflow Foundation (WF) defines workflows as object graphs. To save or compile workflow definitions, these object graphs must be serialized, and WF supports serialization to both XAML and code. Similar to other components, WF utilizes the .NET design-time framework for serialization and deserialization...
  • Blog Post: Validating Code Serialized by CodeDomDesignerLoaders

    A while back I wrote about unit testing component serializers , but I left the task of validating the generated code against an expected result up to the reader. The approach outlined in that article was to retrieve the generated code as a string and compare it to an expected string. While this is certainly...
  • Blog Post: How To Dispose Members From Forms

    When you create a new Form (or UserControl for that matter), Visual Studio creates it as a partial class, with the designer-generated code going into the *.Designer.cs file. One other piece of code that also goes into the designer code is an override of System.ComponentModel.Component.Dispose(bool),...
  • Blog Post: A Faster TestTypeResolutionService

    In February, I wrote about unit testing CodeDomSerializers , but although it was a good initial attempt, there was room for improvement (as I also described in the article). Back then, my main priority was just to get my unit tests working, so other issues were less important to me at the time. Since...
  • Blog Post: Serializing Read-Only Collections to Code

    In some cases, a Component or Control may have the need to contain a read-only collection of complex objects. Additionally, although you don't want to enable a developer to change the collection itself at design time, you still want to make it possible for the developer to edit the items in the collection...
  • Blog Post: Towards Unit Testing Component Serializers

    When writing complex components or controls, it is sometimes necessary to implement custom CodeDOM serialization of the control. If the code serialization logic is complex, it would be nice if it was possible to unit test this logic. It's not quite as easy as it may seem, but it can be done, which I...
  • Blog Post: Unit Testing Control Designers

    One of the inherent problems of control development is that it doesn't lend itself easily to unit testing. After all, you are developing a user interface, and it's necessary to validate that it looks as expected. While that's true, more complex control logic may still benefit from some unit testing....
Page 1 of 1 (12 items)