Beispiel #1
0
            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");
            }
Beispiel #2
0
 private void PrepareStackToPerformUndo()
 {
     addedObject = new TestObject();
     stack.AddItem(addedObject);
 }
Beispiel #3
0
 private void PrepareStackWithItemToPerformRedo()
 {
     undoneObject = new TestObject();
     stack.AddItem(undoneObject);
     stack.Undo(); //so we now should have it in the redo list
 }
Beispiel #4
0
            public new void TearDown()
            {
                base.TearDown();

                addedObject = null;
                stack = null;
            }
Beispiel #5
0
            public new void TearDown()
            {
                base.TearDown();

                undoneObject = null;
                stack = null;
            }