logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.Menu.Tests.Editor

    Classes

    MainMenuGraphLoaderTests

    EditMode tests for Serenity.Menu.Infrastructure.Editor.Builder.MainMenuGraphLoader.Load(Serenity.Menu.Application.Navigation.IMenuNavigationLookup,System.String): a chain of menus reachable from a temp InitialViewId, an unset InitialViewId, and no settings asset at all. searchRootFolder is always this fixture's temp folder, so the run never resolves the package-shipped Assets/Serenity/Media/Ui/UiSettings.asset singleton instead of the fixture.

    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.

    MenuCreatorTests

    EditMode tests for MenuCreator: drafts creating new menu assets, drafts loaded from an existing asset updating it in place, and id-collision validation across a batch of drafts and the project's existing menus. Mirrors MenuServiceSettingsCreatorTests's temp-folder pattern.

    MenuDraftTransitionTargetsTests

    EditMode tests for Serenity.Menu.Infrastructure.Editor.Builder.MenuDraftTransitionTargets.Merge(System.Collections.Generic.IReadOnlyList{Serenity.Menu.Infrastructure.Settings.Editor.MenuTransitionTargetCandidate},System.Collections.Generic.IReadOnlyList{Serenity.Menu.Infrastructure.Editor.Builder.MenuDraft},Serenity.Menu.Infrastructure.Editor.Builder.MenuDraft), the rule deciding what a Menu Manager draft's TRANSITION option may target. Driven with a hand-built project list rather than MenuTransitionTargetCatalog, so the assertions describe the rule instead of whatever assets the test project happens to hold.

    MenuPreviewLauncherThemeTests

    EditMode tests for Serenity.Menu.Infrastructure.Editor.Builder.MenuPreviewLauncher.EffectivePreviewTheme: it must distinguish "no preview has ever been opened" (fall back to the seed) from "an open preview's author explicitly chose None (wireframe)" (stay null even though a seed exists) — a null-coalesce on CurrentThemeOfOpenWindow() alone cannot tell the two apart, since both return null. See Serenity.Menu.Infrastructure.Editor.Builder.MenuPreviewLauncher.EffectivePreviewTheme's own remarks.

    MenuServiceSettingsCreatorTests

    EditMode tests for MenuServiceSettingsCreator: field validation and, in a temporary folder, actual settings asset creation — including the create-vs-update singleton contract. Every fixture uses an explicit Serenity.Menu.Tests.Editor.MenuServiceSettingsCreatorTests.TempFolder and either an explicit new-asset path or an explicit MenuServiceSettingsCreator.Input.ExistingSettingsAssetPath: Create(Input) never scans the project for the singleton (only CreateMenuServiceSettingsWindow.PreselectExistingSingleton does, via ResolveSettingsContext(string, string)), so these tests stay hermetic even though the package ships its own real singleton at Assets/Serenity/Media/Menu/MenuServiceSettings.asset — that asset is never touched here. Mirrors Serenity.Audio.SoundMixerSettings.Tests.Editor.SoundMixerSettingsCreatorTests.

    MenuServiceSettingsStepGuiConsumeReachableGraphLoadRequestTests

    EditMode tests for ConsumeReachableGraphLoadRequest() — the gate OnBeforeDrawStep() checks before auto-loading the reachable menu graph.

    MenuTransitionTargetCatalogProjectionTests

    EditMode tests for MenusById(), NonMenuViewIds(), Serenity.Menu.Infrastructure.Settings.Editor.MenuTransitionTargetCatalog.ViewKindsById and Serenity.Menu.Infrastructure.Settings.Editor.MenuTransitionTargetCatalog.OutboundEdgesById: all ride the catalog's own session-cached, Addressables-label-based project scan (see MenuTransitionTargetCatalog's own remarks).

    ViewNodeListGuiDuplicateTests

    EditMode tests for Serenity.Menu.Infrastructure.Editor.Builder.ViewNodeListGui.DuplicateDraft(System.Collections.Generic.List{Serenity.Menu.Infrastructure.Editor.Builder.MenuDraft},System.Int32)'s identity handling: a duplicate is built with EditorUtility.CopySerialized, which copies the source's guid too, so the copy must be given one of its own — two drafts sharing a guid make a sibling transition target ambiguous and write two assets that collide on the identity every by-guid lookup resolves through.

    In this article
    © 2026 Serenity. All Rights Reserved