NUnit TestFixtureSetup not being called

R

Rob Roberts

I'm trying to convert an existing C# project from .NET 1.1 and Visual Studio
2003 to .NET 2.0 and Visual Studio 2005. I was using NUnit 2.2.0 to run my
unit tests under .NET 1.1.

I installed NUnit 2.2.5 for .NET 2.0, compiled my test suite library with VS
2005, and then ran it. (So far I have made no code changes whatsoever to my
project.) I found that all of my tests that had a TestFixtureSetup method
failed because the TestFixtureSetup method never got called.

Has anyone else run into this, or does anyone have any idea what the problem
is?

Thanks in advance,
--Rob Roberts
 
R

Rob Roberts

This turned out to be a bug that was introduced into NUnit sometime after
version 2.2.0. In version 2.2.0, TestFixtureSetUp and TestFixtureTearDown
methods could be declared as protected. In version 2.2.5 they have to be
declared as public or else they don't get called.

--Rob Roberts
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top