Namespace: DeltaEngine.Input.Tests
Assembly: DeltaEngine.Input.Tests (in DeltaEngine.Input.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Input.Tests (in DeltaEngine.Input.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test] public void InvokeDoubleTap() { var touch = Resolve<Touch>() as MockTouch; if (touch == null) return; //ncrunch: no coverage var trigger = new TouchDoubleTapTrigger(); bool wasInvoked = false; new Command(() => wasInvoked = true).Add(trigger); touch.SetTouchState(0, State.Pressing, Vector2D.Half); AdvanceTimeAndUpdateEntities(); touch.SetTouchState(0, State.Releasing, Vector2D.Half); AdvanceTimeAndUpdateEntities(); touch.SetTouchState(0, State.Pressing, Vector2D.Half); AdvanceTimeAndUpdateEntities(); touch.SetTouchState(0, State.Releasing, Vector2D.Half); AdvanceTimeAndUpdateEntities(); Assert.IsTrue(wasInvoked); }
See Also