private void RaiseUndoRedoHappened(bool expected = true) { if (!expected) { _statusUtil.Setup(x => x.OnError(Resources.Common_UndoRedoUnexpected)).Verifiable(); } var args = new TextUndoRedoEventArgs(TextUndoHistoryState.Undoing, null); _textUndoHistory.Raise(x => x.UndoRedoHappened += null, _textUndoHistory.Object, args); if (!expected) { _statusUtil.Verify(); } }
private void RaiseUndoRedoHappened(bool expected = true) { if (!expected) { _statusUtil.Setup(x => x.OnError(Resources.Undo_RedoUnexpected)).Verifiable(); } var args = new TextUndoRedoEventArgs(TextUndoHistoryState.Undoing, null); _mockUndoHistory.Raise(x => x.UndoRedoHappened += null, _mockUndoHistory.Object, args); if (!expected) { _statusUtil.Verify(); } }