public abstract class TestFixture : ITestFixture, IDisposable
Public MustInherit Class TestFixture Implements ITestFixture, IDisposable
public ref class TestFixture abstract : ITestFixture, IDisposable
[<AbstractClassAttribute>] type TestFixture = class interface ITestFixture interface IDisposable end
Thetype exposes the following members.
Returns true if the Start(Action) method is running.
Returns true if the instance has been disposed.
Returns true if the fixture has been initialized.
Used by unit test classes to persist arbitrary name/value information across individual unit tests.
Verifies that the fixture instance has not been disposed.
Verifies that the fixture instance's Start(Action) method is executing.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Releases all associated resources.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Serves as the default hash function.(Inherited from Object.)
Gets the Type of the current instance.(Inherited from Object.)
Creates a shallow copy of the current Object.(Inherited from Object.)
Called when an already started fixture is being restarted. This provides the fixture an opportunity to do some custom initialization. This base method does nothing.
INTERNAL USE ONLY: Resets the fixture state.
Returns a string that represents the current object.(Inherited from Object.)
IMPORTANT: The Neonimplementation DOES NOT support parallel test execution because fixtures may impact global machine state like starting a Couchbase Docker container, modifying the local DNS hosts file or managing a Docker Swarm or cluster.
You should explicitly disable parallel execution in all test assemblies that rely on test fixtures by adding a C# file with:
[assembly: CollectionBehavior(DisableTestParallelization = true, MaxParallelThreads = 1)]
Test fixtures that modify global machine or other environmental state must implement a public static void EnsureReset() method resets the state to reasonable defaults. These will be reflected and called when the first is created by the test runner for every test class.