Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
DeltaEngine.Input.Tests TouchDualDragTriggerTests
Namespace: DeltaEngine.Input.Tests
Assembly: DeltaEngine.Input.Tests (in DeltaEngine.Input.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The TouchDualDragTriggerTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TouchDualDragTriggerTests | Initializes a new instance of the TouchDualDragTriggerTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
Create | ||
DragTouch | ||
DragTouchToCreateRectangles | ||
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test] public void DragTouchToCreateRectangles() { MouseDragTriggerTests.DragToCreateRectangles(new TouchDualDragTrigger()); }
[Test, CloseAfterFirstFrame] public void DragTouch() { var touch = Resolve<Touch>() as MockTouch; if (touch == null) return; //ncrunch: no coverage bool isFinished = false; new Command((start, end, done) => isFinished = done).Add(new TouchDualDragTrigger()); SetTouchState(touch, State.Pressing, Vector2D.Zero); SetTouchState(touch, State.Pressed, Vector2D.One); SetTouchState(touch, State.Releasing, Vector2D.One); Assert.IsTrue(isFinished); }
[Test, CloseAfterFirstFrame] public void Create() { var trigger = new TouchDualDragTrigger(); Assert.AreEqual(DragDirection.Free, trigger.Direction); trigger = new TouchDualDragTrigger(new Dictionary<string, string> { { "Direction", "Horizontal" } });
See Also