Specifies that a class represents a test fixture. This attribute is optional.

Namespace:  MbUnit.Framework
Assembly:  MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.459.0)

Syntax

C#
public class TestFixtureAttribute : TestTypePatternAttribute
Visual Basic (Declaration)
Public Class TestFixtureAttribute _
	Inherits TestTypePatternAttribute

Remarks

The test fixture attribute is applied to a class that contains a suite of related test cases. If an error occurs while initializing the fixture or if at least one of the test cases within the fixture fails, then the fixture itself will be deemed to have failed. Otherwise the fixture will pass. Output from the fixture, such as text written to the console, is captured by the framework and will be included in the test report.

A test fixture has no timeout by default. This may be changed using the TimeoutAttribute.

This attribute may be omitted whenever a test fixture class contains at least one test method or test parameter or when other MbUnit attributes are applied to the test fixture class. This is almost always the case unless for some reason you have an empty fixture.

The class must have a public default constructor. The class may not be static.

Inheritance Hierarchy

See Also