protected void Create(params string[] lines) { _vimBuffer = CreateVimBuffer(lines); _textBuffer = _vimBuffer.TextBuffer; _vimKeyProcessor = new VimKeyProcessor(_vimBuffer, KeyUtil); _simulation = new KeyProcessorSimulation((IWpfTextView)_vimBuffer.TextView); _simulation.KeyProcessors.Add(_vimKeyProcessor); }
protected void Create(params string[] lines) { _vimBuffer = CreateVimBuffer(lines); _textBuffer = _vimBuffer.TextBuffer; _vimKeyProcessor = new VimKeyProcessor(_vimBuffer, KeyUtil); _simulation = new KeyboardInputSimulation((IWpfTextView)_vimBuffer.TextView); _simulation.KeyProcessors.Add(_vimKeyProcessor); }
/// <summary> /// Setup the KeyProcessor giving it the keyboard layout specified by the provided /// language id /// </summary> protected virtual void Setup(string languageId) { if (!String.IsNullOrEmpty(languageId)) { _keyboardId = NativeMethods.LoadKeyboardLayout(languageId, NativeMethods.KLF_ACTIVATE, out _mustUnloadLayout); Assert.NotEqual(_keyboardId, IntPtr.Zero); } else { _keyboardId = IntPtr.Zero; } _processor = CreateKeyProcessor(); }
/// <summary> /// Setup the KeyProcessor giving it the keyboard layout specified by the provided /// language id /// </summary> protected virtual void Setup(string languageId) { if (!String.IsNullOrEmpty(languageId)) { _keyboardId = NativeMethods.LoadKeyboardLayout(languageId, NativeMethods.KLF_ACTIVATE, out _mustUnloadLayout); Assert.NotEqual(_keyboardId, IntPtr.Zero); } else { _keyboardId = IntPtr.Zero; } _factory = new MockRepository(MockBehavior.Strict); _buffer = _factory.Create <IVimBuffer>(); _processor = new VimKeyProcessor(_buffer.Object); }
public VimKeyProcessorTest() { _processor = CreateKeyProcessor(); }
/// <summary> /// Setup the KeyProcessor giving it the keyboard layout specified by the provided /// language id /// </summary> protected virtual void Setup(string languageId) { if (!String.IsNullOrEmpty(languageId)) { _keyboardId = NativeMethods.LoadKeyboardLayout(languageId, NativeMethods.KLF_ACTIVATE, out _mustUnloadLayout); Assert.NotEqual(_keyboardId, IntPtr.Zero); } else { _keyboardId = IntPtr.Zero; } _factory = new MockRepository(MockBehavior.Strict); _buffer = _factory.Create<IVimBuffer>(); _processor = new VimKeyProcessor(_buffer.Object, KeyUtil); }