blog community

Welcome to blog community Sign in | Join | Help
in Search

Raimond Brookman

Architecture and .NET Development

Converting NUnit TestFixtureSetp and Teardown to MS UnitTest framework

When converting some tests I needed to convert TestFixtureSetup and TestFixtureTeardown. Simply replacing TestFixtureSetup/Teardown with ClassInitialize/Cleanup left me with an error when executing tests.

VS2005 complained that the signature of the method for Initialize and Cleanup was not correct.

I found the following signatures to work:

[ClassInitialize]
public static void FixtureSetup(TestContext t)

[ClassCleanup]
public static void FixtureTeardown()

Apparently someone decided that these functions should be static now. As to why that is, I'm still in the dark, but I'm trying to find out the answer on that..

Published Wednesday, May 04, 2005 10:13 AM by Raimondb

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

Subscribe in NewsGator Online

Subscribe in Bloglines

Add to Google


 Visitors since June 2005




Powered by Community Server, by Telligent Systems