Search Results for

    Show / Hide Table of Contents

    Class Test_AdminAccessControl

    Tests for the admin access control functionality in the UI.

    Inheritance
    object
    Test_AdminAccessControl
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OEMS.UnitTests.UI
    Assembly: OEMS.UnitTests.dll
    Syntax
    [TestClass]
    public sealed class Test_AdminAccessControl
    Remarks

    This test class focuses on verifying that admin-only access is correctly implemented in the RoleService, which is used by UI components.

    Methods

    Cleanup()

    Declaration
    [TestCleanup]
    public void Cleanup()

    SetUp()

    Initializes the test environment before each test run.

    Declaration
    [TestInitialize]
    public void SetUp()

    VerifyAdminUserCanAccessAdminFeatures()

    Tests that admin users are correctly identified by the RoleService.

    Declaration
    [TestMethod]
    public Task VerifyAdminUserCanAccessAdminFeatures()
    Returns
    Type Description
    Task

    VerifyNonAdminUserCannotAccessAdminFeatures()

    Tests that non-admin users are correctly blocked from admin-only features.

    Declaration
    [TestMethod]
    public Task VerifyNonAdminUserCannotAccessAdminFeatures()
    Returns
    Type Description
    Task
    In this article
    Back to top Generated by DocFX