private void AssertEqual(KeyEvent expectedEvent, KeyEvent actualEvent) { Assert.AreEqual(expectedEvent.ToString(), actualEvent.ToString(), "Checking that events are equal."); }
internal KeyEvent ToKeyEvent(KeyDirection keyDirection) { KeyEvent keyEvent = new KeyEvent(); if (Key.HasValue) { keyEvent.Key = Key.Value; } if (ScanCode.HasValue) { keyEvent.ScanCode = ScanCode.Value; } keyEvent.Direction = keyDirection; keyEvent.Extended = Extended; return keyEvent; }