Class TestBase<TAppFixture, TState>
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, TState> : TestBase<TAppFixture>, IAsyncLifetime, IAsyncDisposable, IFaker, IClassFixture<TAppFixture>, IClassFixture<TState> where TAppFixture : BaseFixture where TState : StateFixture
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. |
TState | the type of the shared state fixture. implement a "state fixture" by inheriting StateFixture abstract class. |