Search Results for

    Show / Hide Table of Contents

    Class TestBase

    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>
    Implements
    IAsyncLifetime
    IAsyncDisposable
    IFaker
    Inherited Members
    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
    [TestCaseOrderer(typeof(TestCaseOrderer))]
    public abstract class TestBase : IAsyncLifetime, IAsyncDisposable, IFaker

    Properties

    Cancellation

    Declaration
    public CancellationToken Cancellation { get; }
    Property Value
    Type Description
    CancellationToken

    Context

    Declaration
    public ITestContext Context { get; }
    Property Value
    Type Description
    ITestContext

    Fake

    bogus data generator

    Declaration
    public Faker Fake { get; }
    Property Value
    Type Description
    Faker

    Output

    Declaration
    public ITestOutputHelper Output { get; }
    Property Value
    Type Description
    ITestOutputHelper

    Methods

    SetupAsync()

    override this method if you'd like to do some setup before each test-case gets executed. it is run per test and is analogous to an async constructor for the test-class. TIP: xunit creates a fresh instance of the test-class per test.

    Declaration
    protected virtual ValueTask SetupAsync()
    Returns
    Type Description
    ValueTask

    TearDownAsync()

    override this method if you'd like to do some teardown/cleanup after each test-case has completed. it is run per test and is analogous to an async destructor for the test-class. TIP: xunit creates a fresh instance of the test-class per test.

    Declaration
    protected virtual ValueTask TearDownAsync()
    Returns
    Type Description
    ValueTask

    Implements

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