FastMoq
Search Results for

    Show / Hide Table of Contents

    Class FakeNavigationManager

    Backward-compatible wrapper around Bunit.TestDoubles.BunitNavigationManager.

    Inheritance
    object
    FakeNavigationManager
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Bunit.TestDoubles
    Assembly: FastMoq.Web.dll
    Syntax
    public sealed class FakeNavigationManager
    Remarks

    This wrapper keeps older FastMoq navigation assertions stable while delegating to bUnit 2's navigation manager.

    Constructors

    FakeNavigationManager(BunitNavigationManager)

    Initializes a new instance of the FakeNavigationManager class.

    Declaration
    public FakeNavigationManager(BunitNavigationManager inner)
    Parameters
    Type Name Description
    BunitNavigationManager inner

    The underlying bUnit navigation manager.

    Properties

    BaseUri

    Gets the base URI.

    Declaration
    public string BaseUri { get; }
    Property Value
    Type Description
    string

    History

    Gets the captured navigation history.

    Declaration
    public IReadOnlyCollection<NavigationHistory> History { get; }
    Property Value
    Type Description
    IReadOnlyCollection<NavigationHistory>
    Examples
    ClickButton("#review-orders", () => NavigationManager.History.Count == 1);
    NavigationManager.Uri.Should().Contain("/orders/review");

    InnerManager

    Gets the underlying bUnit navigation manager.

    Declaration
    public BunitNavigationManager InnerManager { get; }
    Property Value
    Type Description
    BunitNavigationManager

    Uri

    Gets the current URI.

    Declaration
    public string Uri { get; }
    Property Value
    Type Description
    string

    Methods

    NavigateTo(string, NavigationOptions)

    Navigates to the specified URI using navigation options.

    Declaration
    public void NavigateTo(string uri, NavigationOptions options)
    Parameters
    Type Name Description
    string uri

    The destination URI.

    NavigationOptions options

    The navigation options.

    NavigateTo(string, bool, bool)

    Navigates to the specified URI.

    Declaration
    public void NavigateTo(string uri, bool forceLoad = false, bool replace = false)
    Parameters
    Type Name Description
    string uri

    The destination URI.

    bool forceLoad

    Whether to force a full page load.

    bool replace

    Whether to replace the current history entry.

    ToAbsoluteUri(string)

    Converts a URI to an absolute URI.

    Declaration
    public Uri ToAbsoluteUri(string relativeUri)
    Parameters
    Type Name Description
    string relativeUri

    The relative URI.

    Returns
    Type Description
    Uri

    The absolute URI.

    ToBaseRelativePath(string)

    Converts a URI to a base-relative path.

    Declaration
    public string ToBaseRelativePath(string uri)
    Parameters
    Type Name Description
    string uri

    The URI to convert.

    Returns
    Type Description
    string

    The base-relative path.

    Extension Methods

    ObjectExtensions.RaiseIfNull<T>(T?, string?, string?, int?, string?)
    TestClassExtensions.GetFieldValue<TObject>(TObject, string, TObject?)
    TestClassExtensions.GetField<TObject>(TObject, string)
    TestClassExtensions.GetMemberName<T, TValue>(T, Expression<Func<T, TValue>>)
    TestClassExtensions.GetMember<T, TValue>(T, Expression<Func<T, TValue>>)
    TestClassExtensions.GetMethodValue<TObject>(TObject, string, object?, params object[])
    TestClassExtensions.GetMethod<TObject>(TObject, string)
    TestClassExtensions.GetPropertyValue<TObject>(TObject, string, object?)
    TestClassExtensions.GetProperty<TObject>(TObject, string)
    TestClassExtensions.SetFieldValue<TObject>(TObject, string, object?)
    TestClassExtensions.SetPropertyValue<TObject>(TObject, string, object?)
    MockerHttpMoqExtensions.SetupHttpMessage(object, Func<HttpResponseMessage>, Expression?, Expression?)
    MockerHttpMoqExtensions.SetupMessageAsync<TMock, TReturn>(object, Expression<Func<TMock, Task<TReturn>>>, Func<TReturn>)
    MockerHttpMoqExtensions.SetupMessageProtectedAsync<TMock, TReturn>(object, string, Func<TReturn>, params object?[]?)
    MockerHttpMoqExtensions.SetupMessageProtected<TMock, TReturn>(object, string, Func<TReturn>, params object?[]?)
    MockerHttpMoqExtensions.SetupMessage<TMock, TReturn>(object, Expression<Func<TMock, TReturn>>, Func<TReturn>)
    TestClassExtensions.GetFieldInfo<TType>(object, string)
    TestClassExtensions.GetFieldValue<T>(object?, FieldInfo)
    TestClassExtensions.GetFieldValue<T, TType>(object, string)
    In this article
    Back to top
    Generated 2026-04-29 03:53 UTC