public void Escape_MoveCaretLeftOnExit() { _broker.SetupGet(x => x.IsCompletionActive).Returns(false).Verifiable(); _broker.SetupGet(x => x.IsQuickInfoActive).Returns(false).Verifiable(); _broker.SetupGet(x => x.IsSignatureHelpActive).Returns(false).Verifiable(); _operations.Setup(x => x.MoveCaretLeft(1)).Verifiable(); var res = _mode.Process(KeyInputUtil.EscapeKey); Assert.IsTrue(res.IsSwitchMode(ModeKind.Normal)); _factory.Verify(); }
public void Escape_MoveCaretLeftOnExit() { _textView.SetText("hello world", 3); _broker.SetupGet(x => x.IsCompletionActive).Returns(false).Verifiable(); _broker.SetupGet(x => x.IsQuickInfoActive).Returns(false).Verifiable(); _broker.SetupGet(x => x.IsSignatureHelpActive).Returns(false).Verifiable(); SetupRunCompleteMode(true); var res = _mode.Process(KeyInputUtil.EscapeKey); Assert.True(res.IsSwitchMode(ModeKind.Normal)); _factory.Verify(); }