Пример #1
0
        public void ctor_sets_properties_correctly()
        {
            var eventArgs = new ToggleKeyEventArgs <int, int>(123, true, 234);

            Assert.That(eventArgs.KeyId, Is.EqualTo(123));
            Assert.That(eventArgs.NewState, Is.True);
            Assert.That(eventArgs.AdditionalData, Is.EqualTo(234));
        }
Пример #2
0
        public void SetUp()
        {
            ResetKeyEvent();

            _keyboardMock = KeyboardTestUtils.CreateKeyboardMock();

            _keyId          = 123;
            _additionalData = 234;
            _key            = new ToggleKey <int, int>(_keyboardMock.Object, _keyId, true);

            _key.OnStateChange += (sender, eventArgs) => _keyEvent = eventArgs;
        }
Пример #3
0
 private void ResetKeyEvent()
 {
     _keyEvent = null;
 }