Namespace Serenity.UnityMenu.Tests.Infrastructure
Classes
CompositeViewServiceResolverTests
Tests for Serenity.Menu.Infrastructure.Services.CompositeViewServiceResolver: it resolves the composite-view service from the static Serenity.Global.Application.Services.ServiceLocatorBridge, returns null while none is registered, and caches the resolved instance on first success. Each test sets and clears the static bridge to stay isolated.
UnityMenuAnchorUtilsTests
Tests for Serenity.Menu.Infrastructure.Views.Factories.UnityMenuAnchorUtils: the pivot/offset math derived from the shared anchor→factor mapping. Verifies pivots per anchor, the inward border-margin sign rule, and the bottom-alignment query.
UnityMenuBuildContextTests
Tests for the Serenity.Menu.Infrastructure.Views.Factories.UnityMenuBuildContext parameter-bag DTO: it must surface the build inputs it was constructed with. The values with observable, dependency-free identity (options map, canvas, audio service id) are asserted by reference/value; the rest are passed as null to confirm verbatim storage.
UnityMenuLazyBuildContextTests
Tests for the shared Serenity.Menu.Infrastructure.Services.UnityMenuLazyBuildContext DTO: it must surface the build inputs it was constructed with. Only the inputs with observable, dependency-free values are asserted; the rest are passed as null to confirm they are stored verbatim.
UnityMenuLazyRegistrationTests
Tests for the Serenity.Menu.Infrastructure.Services.UnityMenuLazyRegistration DTO: it must expose the menu id, settings, and view-model passed to its constructor unchanged.
UnityMenuOptionBuildContextTests
Tests for the Serenity.Menu.Infrastructure.Views.Factories.UnityMenuOptionBuildContext parameter-bag DTO: it must expose exactly the option, view, settings, index, and theme passed to its constructor.
UnityMenuOptionValidationServiceTests
Tests for Serenity.Menu.Infrastructure.Views.Factories.UnityMenuOptionValidationService: TRANSITION/ACTION options skip the game-settings lookup, value-bearing options require an existing setting (otherwise throw), and the duplicate-id guard throws and logs a single error only when ids collide.
UnityMenuServiceFactoryTests
Tests for Serenity.Menu.Infrastructure.Services.Factories.UnityMenuServiceFactory: it must build a GameObject named for the service and return the attached Serenity.Menu.Infrastructure.Services.UnityMenuService as an Serenity.Menu.Application.Interfaces.Services.IMenuService.
UnityMenuServiceSettingsDefinitionTests
Tests for the Serenity.Menu.Infrastructure.Settings.UnityMenuServiceSettingsDefinition ScriptableObject: its explicit-interface members must surface the inspector-authored public fields, including the Unity→System Vector2 conversion of the border margin.
UnityMenuSettingsDefinitionTests
Tests for the Serenity.Menu.Infrastructure.Settings.UnityMenuSettingsDefinition ScriptableObject: the explicit Serenity.Menu.Domain.Interfaces.IMenuSettingsDefinition members must surface the inspector-authored public fields, the inherited scrollable-view fields must round-trip, and the documented enum defaults must hold.
UnityMenuSubmitServiceTests
Tests for Serenity.Menu.Infrastructure.Views.Factories.UnityMenuSubmitService's dependency-only path DispatchOptionSignal:
each of an option's submit signals is dispatched, a null dispatcher throws, and an option with no
signals dispatches nothing. The view-coupled overloads are not exercised here (they require a fully
initialized Serenity.Menu.Infrastructure.Views.UnityMenuView / live components).
UnityMenuThemeSoundFactoryTests
Tests for Serenity.Menu.Infrastructure.Views.Factories.UnityMenuThemeSoundFactory: it maps each of the theme's seven SFX definitions
onto a UI-typed AudioPlayerClip on the produced Serenity.Ui.Domain.Interfaces.IUiThemeSounds, carrying the id
and file path across.