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

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

                undoneObject = null;
                stack = null;
            }