views:

770

answers:

1

I am getting close to finish my database, so far, 16 tables so far, and I need to unit test my DAO layer for this ASP.NET project.

I am using the Unity Framework to decouple the layers, so I expect that I should be able to assign the DAO layer to my unit tests, which will be testing against the interfaces since the concrete classes are injected in.

I am using C# 2008 Express to do the unit testing.

I have never tried to create a test against an interface, I hope it will work, but I will try it after I finally get the DAO layer better implemented.

Should this work properly using the unit test framework that VS2008 Express comes with?

Edit: As it was mentioned, the Express version doesn't have a unit testing option, so I will be using NUnit for my unit testing and will be going directly to the database, so I can test all the features in the database.

+1  A: 

I was under the impression that there was no unit testing framework bundled with the Express Edition, however you clearly have one.

There should be no problem writing unit tests when Unity Framework is in the mix. It should be a matter of either supplying an appropriate configuration file or manually populating the container. I find the combination of creating Mocks and Stubs using Rhino Mocks and registering them with the container using the RegisterInstance methods of the Unity container allow very thorough and flexible testing.

Brett Carswell
There may not be, I haven't looked yet, as I am still working on finishing the DAO. I may need to use something like NUnit, which I have used before.
James Black