Namespace Serenity.Leaderboard.Tests.Editor
Classes
LeaderboardButtonFocusTests
EditMode tests for LeaderboardButtonFocus: which button has focus, and the rules for
moving it. Builds bare handles (no themed component, no procedural image) via
LeaderboardButtonHandle's internal constructor — this slice only asserts which handle is
current, not how focus is rendered (covered by UnityLeaderboardPanelTests/factory-level tests).
LeaderboardColumnLayoutTests
EditMode tests for LeaderboardColumnLayout. Pure resolution logic, so every case runs without an editor/player context.
LeaderboardElementPlacementTests
EditMode tests for LeaderboardElementPlacement, LeaderboardElementPlacementDefaults and the placement resolution on UnityLeaderboardViewDefinition.
LeaderboardPanelPlacementApplierTests
EditMode tests for LeaderboardPanelPlacementApplier's
LeaderboardPanelPlacementApplier.PlacedElement overload — the shape a caller with its own
list of owners (leaderboard buttons) uses instead of the fixed LeaderboardViewElement one,
covered separately by UnityLeaderboardPanelTests.
LeaderboardRowContentMapperTests
EditMode tests for LeaderboardRowContentMapper. Pure mapping logic, so every case runs without an editor/player context.
LeaderboardTableMapperTests
EditMode tests for Serenity.Leaderboard.Infrastructure.Views.LeaderboardTableMapper. Pure mapping logic (no Unity GameObjects), so every case runs without an editor/player context.
LeaderboardValueFormatterTests
EditMode tests for LeaderboardValueFormatter. Pure formatting logic, so every case runs
without an editor/player context.
Rounding-boundary cases deliberately use values whose fractional part is exactly representable in
binary (e.g. 0.5, 12.25, 12.125) rather than decimal-looking values like 0.995 -- those are NOT exact
as doubles, so asserting a specific rounded result for them would be testing floating-point
representation quirks instead of the formatter's rounding rule.
LeaderboardViewButtonTests
EditMode tests for LeaderboardViewButton and ResolveButtons().
LeaderboardViewDefinitionScannerTests
EditMode tests for LeaderboardViewDefinitionScanner, one per authoring rule.
UnityLeaderboardPanelTests
EditMode tests for UnityLeaderboardPanel's procedural fallback (built by
CreateProcedural(Transform, GameObject), the path used when no theme LeaderboardTemplate
is configured). Builds a throwaway hierarchy per test; TearDown() destroys it.
UnityLeaderboardScoreSubmitterEditorTests
EditMode tests for the UnityLeaderboardScoreSubmitter field migration and the pure
popup-vs-plain-field decision logic behind UnityLeaderboardScoreSubmitterEditor. The
editor's OnInspectorGUI itself is not driven here (see CreateLeaderboardWindowDoneStepTests
for why this project tests IMGUI logic through its extracted static seams instead).
UnityLeaderboardViewDefinitionTests
EditMode tests for UnityLeaderboardViewDefinition's resolve methods and its lazy ShowBackground/BackgroundSprite → BackgroundMode migration.
UnityLeaderboardViewHudElementTests
EditMode tests for UnityLeaderboardView's HUD element authoring: a view's HudElements render through the same UnityHudElementView a HUD host builds with, parented under the panel rather than a HUD's own canvas. Mirrors how lightly UnityLeaderboardViewLayoutTests builds its own panel and view.
UnityLeaderboardViewLayoutTests
EditMode tests for how Configure(UnityLeaderboardViewDefinition, UnityLeaderboardPanel, ILeaderboardService, ILeaderboardSettings, IEventDispatcherService, IViewRouter, IViewBrowserService, SerenityUiContext, ILogService, IServiceLocator) always drives
ApplyElementPlacements(IReadOnlyList<LeaderboardElementPlacement>) with the definition's resolved placements.
Builds a panel and a view with every collaborator left null (Configure only stores them; nothing else
touches them for these assertions), mirroring how lightly UnityLeaderboardViewCancelTests builds
its own view but without the router/history scaffolding this slice doesn't need.
UnityLeaderboardViewLocalizationTests
EditMode tests for UnityLeaderboardView's runtime translation of authored column affixes:
Configure(UnityLeaderboardViewDefinition, UnityLeaderboardPanel, ILeaderboardService, ILeaderboardSettings, IEventDispatcherService, IViewRouter, IViewBrowserService, SerenityUiContext, ILogService, IServiceLocator) resolves an ILocalizationService from the
injected locator (mirroring ResolveHudElementService's lookup shape) and passes it into
Map(IReadOnlyList<RankedEntry>, LeaderboardValueFormat, Func<string, string>) as the translator; rows re-render whenever
GameLanguageChanged fires. Mirrors how lightly
UnityLeaderboardViewLayoutTests and UnityLeaderboardViewHudElementTests build
their own panel and view.
UnityLeaderboardViewServiceTests
EditMode tests for UnityLeaderboardViewService's registry behavior (Register/HasView/ ShowView/HideView). Uses a plain IViewBase fake, so no GameObject/scene setup is needed.