public void ShouldCorrectlyAddANewItemAndHaveItInTheRedoList() { //arrange var item = new TestObject(); //act stack.AddItem(item); var resultItem = stack.UndoItems().ElementAt(0); //assert Assert.AreEqual(item, resultItem, "the item should be the same"); }
private void PrepareStackToPerformUndo() { addedObject = new TestObject(); stack.AddItem(addedObject); }
private void PrepareStackWithItemToPerformRedo() { undoneObject = new TestObject(); stack.AddItem(undoneObject); stack.Undo(); //so we now should have it in the redo list }
public new void TearDown() { base.TearDown(); addedObject = null; stack = null; }
public new void TearDown() { base.TearDown(); undoneObject = null; stack = null; }