public void Push_InMiddleOfStack_RemovesLaterReversibles() { var reversibles = new ReversibleStack(); var value = new Value(); reversibles.Push(new Add1(value)); reversibles.Push(new Add1(value)); reversibles.Push(new Add1(value)); reversibles.Undo(); reversibles.Undo(); reversibles.Push(new Add1(value)); reversibles.Redo(); reversibles.Redo(); Assert.AreEqual(2, value.Number); }
public void PushUndoRedo_Is1() { var reversibles = new ReversibleStack(); var value = new Value(); reversibles.Push(new Add1(value)); reversibles.Undo(); reversibles.Redo(); Assert.AreEqual(1, value.Number); }
public void Redo_AtZeroReversibles_DoesNothing() { var reversibles = new ReversibleStack(); reversibles.Redo(); }