Class Test_NavMenu
Tests for the NavMenu component.
Inherited Members
Namespace: OEMS.UnitTests.UI.Components
Assembly: OEMS.UnitTests.dll
Syntax
[TestClass]
public sealed class Test_NavMenu
Remarks
This test class focuses on verifying the logic that controls the display of the OrganizationRegister link in the navbar based on the user's admin status.
Methods
NavMenu_CallsRefreshRolesAsyncDuringInitialization()
Tests that the NavMenu component calls RefreshRolesAsync during initialization.
Declaration
[TestMethod]
public void NavMenu_CallsRefreshRolesAsyncDuringInitialization()
NavMenu_HasIsAdminField()
Tests that the NavMenu component contains the isAdmin field that controls the visibility of the OrganizationRegister link.
Declaration
[TestMethod]
public void NavMenu_HasIsAdminField()
NavMenu_HasRefreshRolesAsyncMethod()
Tests that the NavMenu component has the RefreshRolesAsync method that retrieves the user's admin status from the RoleService.
Declaration
[TestMethod]
public void NavMenu_HasRefreshRolesAsyncMethod()
NavMenu_RazorFileContainsAdminCheck()
Tests that the NavMenu markup contains a conditional check for isAdmin to control the visibility of the OrganizationRegister link.
Declaration
[TestMethod]
public void NavMenu_RazorFileContainsAdminCheck()