Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Component Development   (RSS)

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

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
Posted by ploeh | 3 Comments

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
Posted by ploeh | 2 Comments

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,
Posted by ploeh | 4 Comments

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

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

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

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
Posted by ploeh | 17 Comments

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

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
Posted by ploeh | 0 Comments

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

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
 
Page view tracker