Class HudPreviewPlacementTargetTests
EditMode tests for Serenity.GameUi.Infrastructure.Editor.Builder.HudPreviewPlacementTarget: the adapter that lets the shared preview manipulation stack read and write a HUD's elements without knowing HUDs exist.
Inherited Members
Namespace: Serenity.GameUi.Tests.Editor.Builder
Assembly: Serenity.GameUi.Tests.Editor.dll
Syntax
public class HudPreviewPlacementTargetTests
Remarks
Round-trips against a non-persistent scratch UnityHudDefinition, the same kind the HUD builder wizard edits before anything is saved to disk — so a passing write here is also proof the adapter works on the wizard's own scratch instance, not only on a saved asset.
Constructors
HudPreviewPlacementTargetTests()
Declaration
public HudPreviewPlacementTargetTests()
Methods
DescribeElement_AnElementWithAnId_ReturnsTheId()
Declaration
public void DescribeElement_AnElementWithAnId_ReturnsTheId()
DescribeElement_AnElementWithNoId_FallsBackToAOneBasedLabel()
Declaration
public void DescribeElement_AnElementWithNoId_FallsBackToAOneBasedLabel()
DescribeElement_AnIndexOutsideTheHud_ReturnsEmpty(int)
Declaration
public void DescribeElement_AnIndexOutsideTheHud_ReturnsEmpty(int elementIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | elementIndex |
Owner_IsTheHudItWasBuiltWith()
Declaration
public void Owner_IsTheHudItWasBuiltWith()
TearDown()
Declaration
public void TearDown()
TryReadPlacement_AnIndexInsideTheHud_ReturnsWhatTheElementHas()
Declaration
public void TryReadPlacement_AnIndexInsideTheHud_ReturnsWhatTheElementHas()
TryReadPlacement_AnIndexOutsideTheHud_ReturnsFalse()
Declaration
public void TryReadPlacement_AnIndexOutsideTheHud_ReturnsFalse()
TryWritePlacement_AnIndexInsideTheHud_ChangesTheElementAndReturnsTrue()
Declaration
public void TryWritePlacement_AnIndexInsideTheHud_ChangesTheElementAndReturnsTrue()
TryWritePlacement_AnIndexOutsideTheHud_ReturnsFalseAndWritesNothing()
Declaration
public void TryWritePlacement_AnIndexOutsideTheHud_ReturnsFalseAndWritesNothing()