示例#1
0
        public void record_two_versions_and_go_back()
        {
            history.Record("a");
            history.Record("b");

            history.Revert();
            history.CanGoBack.ShouldBeFalse();
            history.CanGoForward.ShouldBeTrue();
        }
示例#2
0
        private void undo()
        {
            if (!_history.CanGoBack)
            {
                return;
            }

            _history.Revert();
            _converter.ApplyJsonChanges(_test, _history.Current);
            enableUndoRedo();
            publish(null);
        }