Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
DeltaEngine.Input.Windows.Tests WindowsKeyboardTests
Namespace: DeltaEngine.Input.Windows.Tests
Assembly: DeltaEngine.Input.Windows.Tests (in DeltaEngine.Input.Windows.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The WindowsKeyboardTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
WindowsKeyboardTests | Initializes a new instance of the WindowsKeyboardTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
CreateWindowsKeyboard | ||
DisposeSetsUnavailable | ||
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) | |
UpdateKeyboard | ||
UpdateKeyStates |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test, CloseAfterFirstFrame] public void UpdateKeyboard() { var trigger = new KeyTrigger(Key.A); keyboard.Update(new[]{trigger});
[Test, CloseAfterFirstFrame] public void DisposeSetsUnavailable() { keyboard.Dispose(); Assert.IsFalse(keyboard.IsAvailable); }
[Test, CloseAfterFirstFrame] public void UpdateKeyStates() { var mockKeyboard = new MockWindowsKeyboard(); mockKeyboard.SetPressedKey(Key.A); var triggerPressing = new KeyTrigger(Key.A); mockKeyboard.Update(new[] { triggerPressing });
See Also