473,396 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Testing events with NUnit

I have a class that validates data in text files and raises events to keep
the caller informed on how things are going. I would like to test this class
using NUnit but don't know how to test events with it. Does anyone have any
ideas?
Nov 16 '05 #1
2 5464
What do you want your event test to do?

Basically, what you could probably do is to register the necessary handler
as you would do in your application. Then create a method (that is not a
test case) that will handle the event. From within this method you should
be able to test if the your event args are correct and anything else that
you need.

"David Anderson" <da*******************@tamko.com> wrote in message
news:9C**********************************@microsof t.com...
I have a class that validates data in text files and raises events to keep
the caller informed on how things are going. I would like to test this class using NUnit but don't know how to test events with it. Does anyone have any ideas?

Nov 16 '05 #2
Okay, that's simple enough. Thanks for the help.

"Peter Rilling" wrote:
What do you want your event test to do?

Basically, what you could probably do is to register the necessary handler
as you would do in your application. Then create a method (that is not a
test case) that will handle the event. From within this method you should
be able to test if the your event args are correct and anything else that
you need.

"David Anderson" <da*******************@tamko.com> wrote in message
news:9C**********************************@microsof t.com...
I have a class that validates data in text files and raises events to keep
the caller informed on how things are going. I would like to test this

class
using NUnit but don't know how to test events with it. Does anyone have

any
ideas?


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: serge | last post by:
I've started researching on Unit Testing and I must admit I had never heard of Unit Testing until a couple of months ago. Obviously I am interested in Unit Testing Stored Procedures. I read the...
14
by: | last post by:
Hi! I'm looking for unit-testing tools for .NET. Somthing like Java has --> http://www.junit.org regards, gicio
2
by: Curtis Justus | last post by:
Hi, I've been searching for solutions to two issues that are undoubtedly common to everybody. The first is how do my team and I adequately perform unit testing. The second is how can I measure...
4
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...
3
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...
4
by: Peter Rilling | last post by:
Does VS.NET 2005 Professional support integrated unit testing, or is that only with the team system?
7
by: Diffident | last post by:
Hello All, Can anyone please suggest me a good unit testing tool. I have seen NUnit but not sure on how I can use it to test my methods which involve session variables, viewstate variables,...
5
by: Mike Hofer | last post by:
I need some advice, folks, and I'm hoping you can provide it. First off, a few disclaimers: 1.) I am an ardant advocate of code quality. Especially, my own. 2.) I am maintaining a massive...
2
by: Mark Elliott | last post by:
Hi All, I'm just playing with asp.net mvc and link-to-sql for the first time. I'm using visual web developer 2008. I create the project fine, choose nunit as my test framework in the wizard. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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...

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.