test fixture (in NUnit)
In NUnit (and in VbUnit), test fixture refers to the Testcase Class on which the Test Methods are implemented. We add the attribute [TestFixture] to the class which hosts the Test Methods.
Some members of the xUnit family assume that an instance of the Testcase Class "is a" test context; NUnit is a good example of this camp. This assumes we are using the Testcase Class per Fixture approach to organizing the tests. When we choose to use a different way of organizing the tests, such as Testcase Class per Class or Testcase Class per Feature, this merging of the concepts of test context and Testcase Class can be confusing. Throughout this book, I use test fixture to mean "the preconditions of the test" (a.k.a. test context) and Testcase Class to mean "the class that contains the Test Methods and any code to set up the test context.
Copyright © 2003-2008 Gerard Meszaros all rights reserved