Ejemplo n.º 1
0
        public void PreventInput1()
        {
            Create(lines: "foo");
            var input = KeyInputUtil.CharToKeyInput('@');

            _operations.Setup(x => x.Beep()).Verifiable();
            Assert.False(_mode.CommandNames.Any(x => x.KeyInputs.First().Char == input.Char));
            Assert.True(_mode.CanProcess(input));
            var ret = _mode.Process(input);

            Assert.True(ret.IsHandledNoSwitch());
            _operations.Verify();
        }
Ejemplo n.º 2
0
 public static bool CanProcess(this IMode mode, VimKey key)
 {
     return(mode.CanProcess(KeyInputUtil.VimKeyToKeyInput(key)));
 }