public void HotkeyHandled_PreviewKeyDownReturnsTrue()
        {
            var hotkeyCommander = new FakeHotkeyCommander {
                HandleHotkeyPressReturn = true
            };
            var shell = CreateShell(null, hotkeyCommander, null, null, null, null);

            Assert.True(shell.PreviewKeyDown(Key.A));
        }
        public void HotkeyNotHandled_PreviewKeyDownReturnsFalse()
        {
            var fakeHotkeyCommander = new FakeHotkeyCommander {
                HandleHotkeyPressReturn = false
            };
            var shell = CreateShell(null, fakeHotkeyCommander, null, null, null, null);

            Assert.False(shell.PreviewKeyDown(Key.A));
        }
        public void PreviewKeyDown_ShellCallsHotkeyCommander()
        {
            var hotkeyCommander = new FakeHotkeyCommander();
            var shell           = CreateShell(null, hotkeyCommander, null, null, null, null);

            Assert.False(hotkeyCommander.HandledHotkeyPressed.Any());
            shell.PreviewKeyDown(Key.A);

            Assert.True(hotkeyCommander.HandledHotkeyPressed.Single() == Key.A);
        }