471,350 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

NUnit TestFixtureSetup not being called

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
Jan 14 '06 #1
1 3573
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

"Rob Roberts" <ro************@AndThisToo.pcisys.net> wrote in message
news:eb*************@TK2MSFTNGP15.phx.gbl...
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

Jan 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Alvin Bruney | last post: by
4 posts views Thread by geoffblanduk_nospam | last post: by
4 posts views Thread by Frank Rizzo | last post: by
3 posts views Thread by JJ | last post: by
20 posts views Thread by Parag | last post: by
2 posts views Thread by JohnGoogle | last post: by
2 posts views Thread by chris | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.