Team System Tests and NUnit Tests

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).

1 Comment

Comments have been disabled for this content.