Class TestBase<TAppFixture>
abstract class for implementing a test-class, which is a collection of integration tests that may be related to each other. test methods can be run in a given order by decorating the methods with PriorityAttribute
Inherited Members
Namespace: FastEndpoints.Testing
Assembly: FastEndpoints.Testing.dll
Syntax
public abstract class TestBase<TAppFixture> : TestBase, IAsyncLifetime, IAsyncDisposable, IFaker, IClassFixture<TAppFixture> where TAppFixture : BaseFixture
Type Parameters
Name | Description |
---|---|
TAppFixture | the type of the app fixture. an app fixture is an implementation of AppFixture<TProgram> abstract class which is a uniquely configured running instance of your application being tested (sut). the app fixture instance is created only once before any of the test methods are executed and torn down after all test methods of the class have run. all test methods of the test-class will be accessing that same fixture instance per test run. the underlying WAF instance however is cached and reused per each derived app fixture type in order to speed up test execution. i.e. it's recommended to use the same derived app fixture type with multiple test-classes. to share common state between multiple test-methods of the same test-class, you can inherit the TestBase<TAppFixture, TState> abstract class and provide an additional "state fixture" for the test-class. |