Пример #1
0
        public void ShouldReturnFalseForNonKeyDown()
        {
            var target     = new Mock <IKeyDispatcherTarget>();
            var dispatcher = new KeyDispatcher(target.Object);

            Assert.False(dispatcher.Dispatch(3, (IntPtr)0, (IntPtr)(0x01 << 31)));
        }
Пример #2
0
        public void ShouldReturnFalseForModifierKeys(Keys key)
        {
            var target     = new Mock <IKeyDispatcherTarget>();
            var dispatcher = new KeyDispatcher(target.Object);

            Assert.False(dispatcher.Dispatch(3, (IntPtr)key, IntPtr.Zero));
        }
Пример #3
0
        public void ShouldReturnFalseForNonPreviewKey()
        {
            var target     = new Mock <IKeyDispatcherTarget>();
            var dispatcher = new KeyDispatcher(target.Object);

            Assert.False(dispatcher.Dispatch(0, IntPtr.Zero, IntPtr.Zero));
        }