FastMoq
Search Results for

    Show / Hide Table of Contents

    Class TestAuthorizationExtensions

    Compatibility extensions that preserve bUnit 1.x helper names used by FastMoq.

    Inheritance
    object
    TestAuthorizationExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Bunit
    Assembly: FastMoq.Web.dll
    Syntax
    public static class TestAuthorizationExtensions

    Methods

    AddTestAuthorization(BunitContext)

    Adds bUnit authorization services and returns a compatibility wrapper around the authorization context.

    Declaration
    public static TestAuthorizationContext AddTestAuthorization(this BunitContext context)
    Parameters
    Type Name Description
    BunitContext context

    The bUnit context.

    Returns
    Type Description
    TestAuthorizationContext

    A compatibility wrapper over the bUnit authorization context.

    Examples
    var authContext = this.AddTestAuthorization();
    authContext.SetAuthorized("migration.user");
    In this article
    Back to top
    Generated 2026-04-29 03:53 UTC