Class Test_NavMenuConditionalDisplay
Tests for the conditional display logic in the NavMenu component.
Inherited Members
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()