Search Results for

    Show / Hide Table of Contents

    Class Test_NavMenuConditionalDisplay

    Tests for the conditional display logic in the NavMenu component.

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

    This test class focuses on the structure of the NavMenu component to verify it has the necessary fields and conditions for admin-based access control.

    Methods

    IsAdmin_WhenFalse_ShouldHideOrganizationRegisterLink()

    Tests that setting the isAdmin field to false prevents the display of the OrganizationRegister link.

    Declaration
    [TestMethod]
    public void IsAdmin_WhenFalse_ShouldHideOrganizationRegisterLink()

    IsAdmin_WhenTrue_ShouldShowOrganizationRegisterLink()

    Tests that setting the isAdmin field to true enables the display of the OrganizationRegister link.

    Declaration
    [TestMethod]
    public void IsAdmin_WhenTrue_ShouldShowOrganizationRegisterLink()

    NavMenu_UsesRoleServiceToCheckAdminStatus()

    Tests that the NavMenu component uses RoleService to determine admin status.

    Declaration
    [TestMethod]
    public void NavMenu_UsesRoleServiceToCheckAdminStatus()
    In this article
    Back to top Generated by DocFX