Visual Studio Unit Testing Extensions v1.2.0.0

Version 1.2.0.0 of these Unit Testing Extensions are available on CodePlex today. The original post that talks about the project can be found here.  An updated NuGet package is also available. This release contains additional assertions on IEnumerable<T>, String, and Type.  Additionally, a helper method was added, AssertHelper.AssertFailed(), to allow consumers to create their own…

1

PowerShell and SQL Server Compact 4.0: A Happy Mix

Using SQL Server Compact 4.0 from PowerShell is easy and powerful. Here is an example that shows how to reference the needed libraries, create the database, and add a table to the database – all from PowerShell. 1: $binpath = "C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Desktop\"; 2: [Reflection.Assembly]::LoadFile("$binpath\System.Data.SqlServerCe.dll") 3: $connectionString = "Data Source=’C:\temp\testDB.sdf’;" 4: 5:…

1

ASP.NET MVC: Fun With Routes

For the purposes of this post, let’s say that we are building a community blogging site.  We want multiple users to be able to maintain separate blogs on the site.  We have an area in our MVC application that is called Blogs.  We have a controller in the Blogs area called BlogController and this controller…

0

Visual Studio Testing Extensions now available on NuGet

I have become a huge fan of NuGet lately.  It really makes managing references and dependencies a lot easier. If you are not familiar with NuGet, here is the description from its site: NuGet (formerly known as NuPack) is a free, open source developer focused package management system for the .NET platform intent on simplifying…

0

Book Review – Microsoft .NET: Architecting Applications for the Enterprise

For the entire month of January, I am doing the Daddy Day Care thing for our 4 month old twins.  Since I can’t really work during this time, I figured that it would be a good chance to catch up on some reading that I have been putting off. This book does a fantastic job…

1

Visual Studio Unit Testing Extensions v1.1.0.0

I just released version 1.1.0.0 of these Unit Testing Extensions on CodePlex today.  The original post that talks about the project can be found here. This release contains additional assertions on DateTime, ICollection<T>, and String.  This release is also targeted to the .NET 4 Framework. Here are some examples of the new assertions in action:…

3

2010 – A New Year, Some New Goals

Like most people, I assume, every new year I come up with a set of goals that I would like to accomplish during the upcoming year.  But I never seem to write them down, so I always forget what my plan was by the time February rolls around.  So starting this year, I am going…

3

ServiceLocator and Unity – Be Careful

Chris Tavarez has provided a handy adapter (UnityServiceLocator) for using ServiceLocator to resolve types from a Unity container.  You can then use ServiceLocator.SetLocatorProvider() to register the UnityServiceLocator as the default provider for ServiceLocator.  For this example, we will be using ServiceLocator and Unity to resolve the type IFoo to Foo using a singleton lifetime.  Then…

3

Tip: Entity Framework, Unity, and The ASP.NET RoleProvider – Read the MSDN Fine Print

A custom Role Provider is a very useful tool for adding custom authorization to your ASP.NET and/or ASP.NET MVC applications.  A common use for a custom Role Provider is when you have role information stored in a data store that differs from the schema that is used by the built-in ASP.NET Role Providers.  In this…

2

Testing Your Unity XML Configuration

When using Unity as your IoC container, one way to configure the container is to use an configuration section in your app.config or web.config file.  A simplified example of this configuration is shown below: 1: <?xml version=”1.0″ encoding=”utf-8″ ?> 2: <configuration> 3: <configSections> 4: <section name=”unity” type=”Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration” /> 5: </configSections> 6:  7: <unity> 8:…

2