public void UpdateKeyStates() { var mockKeyboard = new MockWindowsKeyboard(); mockKeyboard.SetPressedKey(Key.A); var triggerPressing = new KeyTrigger(Key.A); mockKeyboard.Update(new[] { triggerPressing }); Assert.AreEqual(State.Pressing, mockKeyboard.GetKeyboardState(Key.A)); mockKeyboard.Update(new[] { triggerPressing }); Assert.AreEqual(State.Pressed, mockKeyboard.GetKeyboardState(Key.A)); mockKeyboard.SetReleasedKeys(Key.A); mockKeyboard.Update(new[] { new KeyTrigger(Key.A, State.Released) }); Assert.AreEqual(State.Releasing, mockKeyboard.GetKeyboardState(Key.A)); }