private void redo() { if (!_history.CanGoForward) { return; } _history.Forward(); _converter.ApplyJsonChanges(_test, _history.Current); enableUndoRedo(); publish(null); }
public void record_four_versions_and_go_backward_and_forward() { history.Record("a"); history.Record("b"); history.Record("c"); history.Record("d"); history.Revert(); history.Current.ShouldEqual("c"); history.CanGoBack.ShouldBeTrue(); history.CanGoForward.ShouldBeTrue(); history.Forward(); history.Current.ShouldEqual("d"); history.CanGoBack.ShouldBeTrue(); history.CanGoForward.ShouldBeFalse(); }