Class HudCreatorSignalDefinitionTests
EditMode tests for the no-code trigger side of HudCreator:
GenerateSignalDefinition generating a Show trigger (pre-wired to
ShowHudSignal) and a Hide trigger (pre-wired to HideHudSignal), mirroring
FeedbackCreator's PlayFeedbackSignal trigger. Every test targets a private temp folder,
so the project's own HUDs and Addressables settings are never touched.
Inherited Members
Namespace: Serenity.GameUi.Tests.Editor.Builder
Assembly: Serenity.GameUi.Tests.Editor.dll
Syntax
public class HudCreatorSignalDefinitionTests
Constructors
HudCreatorSignalDefinitionTests()
Declaration
public HudCreatorSignalDefinitionTests()
Methods
Create_DefaultInput_AlsoGeneratesAHideTriggerAssetNextToTheHud()
Declaration
public void Create_DefaultInput_AlsoGeneratesAHideTriggerAssetNextToTheHud()
Create_DefaultInput_GeneratesAShowTriggerAssetNextToTheHud()
Declaration
public void Create_DefaultInput_GeneratesAShowTriggerAssetNextToTheHud()
Create_GenerateSignalDefinitionFalse_DoesNotCreateEitherTriggerAsset()
Declaration
public void Create_GenerateSignalDefinitionFalse_DoesNotCreateEitherTriggerAsset()
Create_HideTrigger_IsPreWiredToHideWhicheverHudIsActive()
Declaration
public void Create_HideTrigger_IsPreWiredToHideWhicheverHudIsActive()
Create_RegisterAsAddressablesFalse_LeavesAddressablesUntouched()
Declaration
public void Create_RegisterAsAddressablesFalse_LeavesAddressablesUntouched()
Create_RegisterAsAddressablesTrue_RegistersTheHudAndBothTriggerAssets()
Declaration
public void Create_RegisterAsAddressablesTrue_RegistersTheHudAndBothTriggerAssets()
Create_ShowAndHideTriggers_HaveDistinctIds()
The Show and Hide triggers generated together must carry genuinely DISTINCT Ids, never the bare HUD
id shared by both — every HUD Builder run that leaves the (on-by-default) trigger toggle checked
produces two UnityEventDispatcherSignalDefinition assets, and Validate Health Check
flags any pair sharing one Id as a duplicate.
Declaration
public void Create_ShowAndHideTriggers_HaveDistinctIds()
Create_ShowTrigger_IsPreWiredToShowTheCreatedHud()
Declaration
public void Create_ShowTrigger_IsPreWiredToShowTheCreatedHud()
Create_ShowTrigger_StillDispatchesTheRealHudId()
The Show trigger's dispatched signal must still name the real HUD, even though its own Id is no longer that same bare string.
Declaration
public void Create_ShowTrigger_StillDispatchesTheRealHudId()
Create_UpdateExistingWithASharedIdTrigger_LeavesItCompletelyUntouched()
Compatibility guard for a HUD whose own trigger shares the bare HUD Id as its trigger Id, rather than the distinct Show/Hide Ids Create_ShowAndHideTriggers_HaveDistinctIds() proves a fresh create produces. Fabricates exactly that shape — one trigger asset whose Id equals the HUD's own bare Id — then updates the HUD, renaming its Id. Because Create(Input)'s update path never calls the trigger-generation step at all (see Create_UpdateExisting_IgnoresGenerateSignalDefinitionForBothTriggers()), the existing trigger's own Id, path and content must survive completely untouched — no rename, no orphaning, no duplicate — regardless of what the HUD's own Id becomes.
Declaration
public void Create_UpdateExistingWithASharedIdTrigger_LeavesItCompletelyUntouched()
Create_UpdateExisting_IgnoresGenerateSignalDefinitionForBothTriggers()
Declaration
public void Create_UpdateExisting_IgnoresGenerateSignalDefinitionForBothTriggers()
Create_ValidationFailure_NeverCreatesEitherTriggerAsset()
Declaration
public void Create_ValidationFailure_NeverCreatesEitherTriggerAsset()
OneTimeTearDown()
Declaration
public void OneTimeTearDown()
SetUp()
Declaration
public void SetUp()
TearDown()
Declaration
public void TearDown()