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)); }
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; }
private void ResetKeyEvent() { _keyEvent = null; }