TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
aaniculaesei
NA
47
0
how to use [SetUp] and [TearDown] attributes in NUnit V2
Apr 14 2005 4:56 AM
Hi there, Need some help with using the [TearDown] and [SetUp] attributes in NUnit. There are two ways of using them: either as : [TestFixtureSetUp] and [TestFixtureTearDown] attributes either as : [SetUp] and [TearDown] attributes The first ones are used when you want a certain method to be run before/after any test are performed. The second ones are used when you want a certain method to be run before/after a test is run. The methods I'm testing are in a class named Calculus and the tests are in a class named MyTestUnit. I have the following problem : - if I use [TestFixtureSetUp] and [TestFixtureTearDown] attributes, in the [TestFixtureSetUp] method I write this code : Calculus myOp = new Calculus() and I don't know what to write in the [TestFixtureTearDown] method. The only way I can get MyTestUnit class to work is to put Calculus myOp = new Calculus() in each test method, but I don't like it this way. :( Plase help me . Any advice , piece of code or any hint appreciated. :) Thanks ;) Cheers, Adisor
Reply
Answers (
0
)
Suggest any good site/resources for design of client/server,n-tier architectures??
Excel and C#