Class 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.
Inherited Members
Namespace: Serenity.Leaderboard.Tests.Editor
Assembly: Serenity.Leaderboard.Tests.Editor.dll
Syntax
public class UnityLeaderboardViewHudElementTests
Remarks
UnityLeaderboardView's HUD element teardown goes through
UnityHudElementView.Dispose, which calls UnityEngine.Object.Destroy unconditionally —
safe at runtime, but Unity refuses (and logs) a Destroy call made outside Play mode, exactly the
situation this EditMode assembly runs in (see UnityGameplayLoadingOverlayView.Hide for the same
distinction already made elsewhere in this codebase). Any test that exercises teardown therefore
silences that expected log via UnityEngine.TestTools.LogAssert.ignoreFailingMessages and asserts the view's own
bookkeeping (Serenity.Leaderboard.Tests.Editor.UnityLeaderboardViewHudElementTests.HudElementViewCount(Serenity.Leaderboard.Infrastructure.Views.UnityLeaderboardView)) rather than the native GameObject's destruction,
which this test runner cannot observe deterministically.
Constructors
UnityLeaderboardViewHudElementTests()
Declaration
public UnityLeaderboardViewHudElementTests()
Methods
Configure_CalledTwice_DoesNotDuplicateHudElements()
Declaration
public void Configure_CalledTwice_DoesNotDuplicateHudElements()
Configure_WithANullHudElementsList_BuildsNothing()
Declaration
public void Configure_WithANullHudElementsList_BuildsNothing()
Configure_WithAnEmptyHudElementsList_BuildsNothing()
Declaration
public void Configure_WithAnEmptyHudElementsList_BuildsNothing()
Configure_WithOneTextHudElement_BuildsOneElementUnderThePanel()
Declaration
public void Configure_WithOneTextHudElement_BuildsOneElementUnderThePanel()
OnDestroy_TearsDownEveryBuiltHudElement()
Declaration
public void OnDestroy_TearsDownEveryBuiltHudElement()
SetUp()
Declaration
public void SetUp()
TearDown()
Declaration
public void TearDown()