Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
DeltaEngine.Input.Tests TouchPressTriggerTests
Namespace: DeltaEngine.Input.Tests
Assembly: DeltaEngine.Input.Tests (in DeltaEngine.Input.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The TouchPressTriggerTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TouchPressTriggerTests | Initializes a new instance of the TouchPressTriggerTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
Create | ||
CreateFromAttributes | ||
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) | |
ShowRedCircleOnTouch |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test, Category("Slow")] public void ShowRedCircleOnTouch() { new FontText(Font.Default, "Touch screen to show red circle", Rectangle.One); var ellipse = new Ellipse(new Rectangle(0.1f, 0.1f, 0.1f, 0.1f), Color.Red); new Command(() => ellipse.Center = Vector2D.Half).Add(new TouchPressTrigger(State.Pressed)); new Command(() => ellipse.Center = Vector2D.Zero).Add(new TouchPressTrigger(State.Released)); } //ncrunch: no coverage end
[Test, CloseAfterFirstFrame] public void Create() { var trigger = new TouchPressTrigger(State.Pressed); Assert.AreEqual(State.Pressed, trigger.State); }
[Test, CloseAfterFirstFrame] public void CreateFromAttributes() { var trigger = new TouchPressTrigger(new Dictionary<string, string> { { "State", "Pressed" } });
See Also