Search Results for

    Show / Hide Table of Contents

    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

    Inheritance
    object
    TestBase
    TestBase<TAppFixture>
    TestBase<TAppFixture, TState>
    Implements
    IAsyncLifetime
    IAsyncDisposable
    IFaker
    IClassFixture<TAppFixture>
    Inherited Members
    TestBase.Fake
    TestBase.Context
    TestBase.Cancellation
    TestBase.Output
    TestBase.SetupAsync()
    TestBase.TearDownAsync()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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.

    Implements

    Xunit.IAsyncLifetime
    IAsyncDisposable
    IFaker
    Xunit.IClassFixture<TFixture>
    In this article
    Back to top Developed by Đĵ ΝιΓΞΗΛψΚ and contributors / Licensed under MIT / Website generated by DocFX