logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class MenuCatalogNavigationLookupTests

    EditMode tests for Serenity.Menu.Infrastructure.Editor.Builder.MenuCatalogNavigationLookup, the IMenuNavigationLookup adapter Serenity.Menu.Infrastructure.Editor.Builder.MainMenuGraphLoader and the reachability walker use against the real project catalog. Every composite fixture is created fresh in this fixture's own temp folder and Addressables-registered under COMPOSITE_VIEW — now that AddressablesManagedLabelNormalizer.ManagedLabels carries that label, a freshly registered composite is genuinely visible to MenuTransitionTargetCatalog by the time the test refreshes it, same as a freshly registered menu already was.

    Inheritance
    object
    MenuCatalogNavigationLookupTests
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Menu.Tests.Editor
    Assembly: Serenity.Menu.Tests.Editor.dll
    Syntax
    public class MenuCatalogNavigationLookupTests

    Constructors

    MenuCatalogNavigationLookupTests()

    Declaration
    public MenuCatalogNavigationLookupTests()

    Methods

    GetHostedMenuIds_FindsBothADirectAndARecursivelyNestedHostedMenu()

    Declaration
    public void GetHostedMenuIds_FindsBothADirectAndARecursivelyNestedHostedMenu()

    GetHostedMenuIds_ReturnsEmptyForAnUnknownView()

    Declaration
    public void GetHostedMenuIds_ReturnsEmptyForAnUnknownView()

    GetHostedMenuIds_SelfHostingCompositeCycle_TerminatesAndReturnsEachHostedMenuOnce()

    Regression coverage for the walk's own cycle guard, two levels deep: Root hosts CompositeX, which hosts CompositeY, which hosts CompositeX right back (X and Y host each other), each composite also hosting a real menu of its own. The walk must terminate instead of recursing forever, and must still surface each hosted menu exactly once.

    Declaration
    public void GetHostedMenuIds_SelfHostingCompositeCycle_TerminatesAndReturnsEachHostedMenuOnce()
    Remarks

    The cycle is built one level below the queried root rather than back at the root itself: MenuTransitionTargetCatalog only keeps a composite in CompositeViewsById() (what Serenity.Menu.Infrastructure.Editor.Builder.MenuCatalogNavigationLookup.GetHostedMenuIds(System.String) looks the root up by) when NOTHING else lists it as a child — a root that referenced itself, or that some other composite pointed back at, would itself read as "nested" and vanish from that lookup before the walk could even start. X and Y referencing each other is fine because neither is looked up by id; Serenity.Menu.Infrastructure.Editor.Builder.MenuCatalogNavigationLookup.GetHostedMenuIds(System.String) only resolves the ROOT through the catalog and then walks the already-loaded Children references directly.

    GetOutboundEdges_ReturnsEmptyForAViewThatDeclaresNone()

    Declaration
    public void GetOutboundEdges_ReturnsEmptyForAViewThatDeclaresNone()

    TearDown()

    Declaration
    public void TearDown()

    TryGetMenu_HitsACreatedMenu()

    Declaration
    public void TryGetMenu_HitsACreatedMenu()

    TryGetViewKind_IsTrueWithCompositeForACompositeKnownToExistInTheProject_FalseForAnUnknownId()

    Declaration
    public void TryGetViewKind_IsTrueWithCompositeForACompositeKnownToExistInTheProject_FalseForAnUnknownId()
    In this article
    © 2026 Serenity. All Rights Reserved