473,706 Members | 2,475 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 3763
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
1446
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
2071
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
4190
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
1816
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
1673
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
8368
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
2018
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
5155
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
3185
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
8697
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9286
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
9156
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...
0
8997
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7911
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
6615
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
5939
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4453
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4709
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.