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(); }
public static bool CanProcess(this IMode mode, VimKey key) { return(mode.CanProcess(KeyInputUtil.VimKeyToKeyInput(key))); }