Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have some experience in MS Test but new to NUnit.

  1. Whether NUnit [Setup] is corresponding to [ClassInitialize] or [TestInitialize] in MS Test?
  2. What is the NUnit attribute corresponding to [TestInitialize]?

REFERENCE:

  1. http://stackoverflow.com/questions/1873191/testinitialize-gets-fired-for-every-test-in-my-visual-studio-unit-tests

  2. http://stackoverflow.com/questions/4602288/nunit-testcontext-currentcontext-test-not-working

share|improve this question
    
Though the site is about XUnit, you can get some of the most used ones here: xunit.codeplex.com/wikipage?title=Comparisons –  cseder Nov 5 '12 at 15:00

1 Answer 1

NUnit [SetUp] corresponds to [TestInitialize].

For [ClassInitialize], use [TestFixtureSetUp] in NUnit.

The complete list can be found by a simple search. (a little old tho)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.