Andrey Bushman
Andrey Bushman

Reputation: 12476

NUnit: "Fixture" -?

Sorry for my English.

I am learn NUnit documentation (v 2.6), and translate it for russian language (here). I can't correctly translate it:

The Assert.Ignore method provides you with the ability to dynamically cause a test or suite to be ignored at runtime. It may be called in a test, setup or fixture setup method.

and

Fixture - an object representing the user fixture, if available, or null

"Fixture"... This word turns the translated result into the senseless. :((( Probably I incorrectly translate it. What synonym on sense for the "Fixture" word? There can be a "class"?

Regards

Upvotes: 1

Views: 318

Answers (1)

brimble2010
brimble2010

Reputation: 18364

The [TestFixture] decorator just means that your class contains test code.

So in answer to your question; the "fixture" that is being referred to is the class containing your unit tests.

Looking at http://www.nunit.org/index.php?p=quickStart&r=2.6.2 we have:

The first thing to notice about this class is that it has a [TestFixture] attribute associated with it – this is the way to indicate that the class contains test code (this attribute can be inherited). The class has to be public and there are no restrictions on its superclass. The class also has to have a default constructor.

Hope this helps :)

Upvotes: 2

Related Questions