Team System Tests and NUnit Tests

Published 21 December 05 08:36 PM | MikeD

I was just looking at the Composite UI App Block (for .NET 2.0 recently released) and they ship with their framework both Nunit and Team System tests.

The really cool thing is this: the test source files are common between the two of them. Here is the header:

#If (Not NUNIT) Then
Imports Microsoft.VisualStudio.TestTools.UnitTesting
#Else
Imports NUnit.Framework
Imports TestClass = NUnit.Framework.TestFixtureAttribute
Imports TestMethod = NUnit.Framework.TestAttribute
Imports TestInitialize = NUnit.Framework.SetUpAttribute
Imports TestCleanup = NUnit.Framework.TearDownAttribute
#End If

This maps the attribute names from TeamSystem into Nunits attributes, and it looks like the Assert methods are the same (or they have used the same methods).

Comments

# .Net Adventures said on December 22, 2005 09:32 AM:

I guess you can map in this way the atribute names from TeamSystem into MbUnit too.