473,915 Members | 5,813 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NUnit TestFixtureSetu p 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 TestFixtureSetu p method
failed because the TestFixtureSetu p 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 3776
This turned out to be a bug that was introduced into NUnit sometime after
version 2.2.0. In version 2.2.0, TestFixtureSetU p and TestFixtureTear Down
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.pci sys.net> wrote in message
news:eb******** *****@TK2MSFTNG P15.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 TestFixtureSetu p
method failed because the TestFixtureSetu p 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1454
by: Alvin Bruney | last post by:
I've a question on unit testing with NUnit. I'm sure I'm missing just a little thing here. Why doesn't NUnit allow me to test a routine with parameter in it like what i want to do is test private string testme(string test) and put my test code in there. So why the emphasis on having me write a specific routine with a void return type and an empty parameter? Is it because its forcing me to write a routine to call testme to make sure it...
4
2080
by: geoffblanduk_nospam | last post by:
I have an NUnit test plan with well over 500 tests. I now need to produce a test plan document for these tests - documenting them one by one with Word is a painfull task. I was thinking that there must be a automated way of doing this - maybe by using NDoc (although available formats don't seem particilariy suited)? Ideally the test plan would be produced with a section for every test
4
4197
by: Frank Rizzo | last post by:
I have a DLL that relies on an XML file (that's in the same folder as the DLL) to read some startup information. When I test my DLL, it seems like NUnit actually copies the DLL into some temp folder (where my XML file obviously doesn't exist) and executes it there. Obviously the test fails because the DLL can't find the XML file. How can I force NUnit to execute the DLL in place? Or is there any way to have it also copy my XML file to...
3
1827
by: JJ | last post by:
Hi, In Nunit testing with asp.net are you guys creating a separate Test assembly for testing or integrating right in class themselves? Is anyone using a third party Unit Test addon for Nunit to test asp.net? What is it called, and how do you like what you are using? Any problems testing user controls with it? Any body have any real world examples of Nunit with asp.net that they can share. Just a skeleton layout would suffice. How many...
0
1682
by: Ray Tayek | last post by:
hi, getting a: .\Stdafx.cpp : fatal error C1192: #using failed on 'i: nunit\samples\cpp-sample"' 'The filename, directory name, or volume label syntax is incorrect.' nunit is installed in i"\nunit. does anyone know what the problem here is? any pointers will be appreciated.
6
8387
by: Ray Tayek | last post by:
hi, i am preparing to teach a class in c++ and would like to intoduce some unit testing. i can make unit tests in c# using this dll and nant from the command line. i am using visual c++ 2005 express at home (the labs may have an earlier version). does anyone know how to tell visual studio to use this dll? thanks
20
2038
by: Parag | last post by:
Hi, I am trying to figure out best testing tool for my project. I have narrowed down my requirements to two tools NUNIT and VSTS unit. But I have used neither and I have to use only one of them. Hence can someone who has used them before share his/her experience on them so that I can get a better idea and make a proper choice ? Any link or suggestions are also welcome. Thanks and Regards, Parag
2
5160
by: JohnGoogle | last post by:
Hi, I'm a newbie so sorry if there is a simple answer to this! I'm using C# in Visual Studio Express at the moment. I've downloaded NUnit v 2.2.8 and can load and run the tests they supply (e.g. nunit.util.tests.dll) so the install of NUnit seems OK. I've compiled one of the sample projects (csharp-sample_VS2005). When I do so I get the following warning after a build:
2
3194
by: chris | last post by:
I have created a file, called nunit_project_name.dll.config, within the bin folder of my Nunit project, but Nunit is not able to find the file. Is this is the right location? I can access the proper connection string if I put in in the machine.config file, but obviously this is not the best choice. I must be putting the file in the wrong dir, but I have tried pretty much every location that I can think of. Help would be greatly...
0
10039
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11354
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9732
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4778
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3368
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.