Class UnityPrimaryInputGateTests
Tests for UnityPrimaryInputGate lifecycle behavior. Ensures the gate properly re-arms in OnEnable after hierarchy changes.
Inherited Members
Namespace: Serenity.InputGateway.Tests.Infrastructure.Components
Assembly: Tests.dll
Syntax
public class UnityPrimaryInputGateTests
Constructors
UnityPrimaryInputGateTests()
Declaration
public UnityPrimaryInputGateTests()
Methods
Cleanup_NonPermanent_ClearsPendingLatch()
Tests that non-permanent cleanup clears the latched press so a stale latch can't deadlock the gate after re-arm.
Declaration
public void Cleanup_NonPermanent_ClearsPendingLatch()
Cleanup_Permanent_ClearsBothFlags()
Tests that permanent cleanup clears both _armed and _shouldBeArmed.
Declaration
public void Cleanup_Permanent_ClearsBothFlags()
Cleanup_Permanent_ClearsPendingLatch()
Tests that permanent cleanup clears the latched press alongside the arming flags.
Declaration
public void Cleanup_Permanent_ClearsPendingLatch()
EnableDisableEnableCycle_ReArmsGate()
Tests the full enable/disable/enable cycle simulating reparenting under inactive hierarchy.
Declaration
public void EnableDisableEnableCycle_ReArmsGate()
OnDeviceChange_OtherDeviceRemoved_KeepsLatch()
Tests that a device change on a DIFFERENT device leaves the latch untouched.
Declaration
public void OnDeviceChange_OtherDeviceRemoved_KeepsLatch()
OnDeviceChange_PendingDeviceRemoved_ResetsLatch()
Tests that removing the latched device mid-hold resets the latch (so the gate can take a fresh press) without completing the pending task.
Declaration
public void OnDeviceChange_PendingDeviceRemoved_ResetsLatch()
OnDisable_ClearsArmedButPreservesShouldBeArmed()
Tests that OnDisable clears _armed but preserves _shouldBeArmed for later re-arming.
Declaration
public void OnDisable_ClearsArmedButPreservesShouldBeArmed()
OnEnable_WhenShouldBeArmedAndNotArmed_ReArmsGate()
Tests that OnEnable re-arms the gate when _shouldBeArmed is true and _armed is false.
Declaration
public void OnEnable_WhenShouldBeArmedAndNotArmed_ReArmsGate()
OnInputEvent_OtherDevicePressIgnoredWhileLatched()
Tests that once a press is latched, a press on a DIFFERENT device is ignored (first press wins).
Declaration
public void OnInputEvent_OtherDevicePressIgnoredWhileLatched()
OnInputEvent_PressLatchesAndReleaseCompletes()
Drives OnInputEvent directly with synthesized state events: a press must only LATCH (task stays pending), and the matching release must drive completion (reaching CompleteJoin, which without a configured PlayerInput resets the latch instead of resolving the task).
Declaration
public void OnInputEvent_PressLatchesAndReleaseCompletes()
SetUp()
Declaration
public void SetUp()
TearDown()
Declaration
public void TearDown()