Table of Contents

HasValidState Method

Definition

HasValidState<TEntryPoint>(IWebApplicationFixture<TEntryPoint>)

Determines whether the specified IWebApplicationFixture<TEntryPoint> has a valid state.

public static bool HasValidState<TEntryPoint>(this IWebApplicationFixture<TEntryPoint> hostFixture) where TEntryPoint : class

Parameters

hostFixture IWebApplicationFixture<TEntryPoint>

The IWebApplicationFixture<TEntryPoint> to check.

Returns

bool

true if the specified IWebApplicationFixture<TEntryPoint> has a valid state; otherwise, false.

Type Parameters

TEntryPoint

A type in the entry point assembly of the application.

Remarks

A valid state is defined as having non-null values for the following properties: Host, ConfigureCallback and ConfigureWebHostCallback.