public void TestingColorUndoRedo() { List <string> undoInput = new List <string>(); SpreadSheet test = new SpreadSheet(50, 26); test.GetCell(1, 0).Color = 4286644096; undoInput.Add("0"); undoInput.Add("0"); undoInput.Add("color"); undoInput.Add("4294967295"); test.AddUndo(undoInput); test.Undo(); Assert.AreEqual(test.GetCell(1, 0).Color.ToString(), "4294967295"); test.Redo(); Assert.AreEqual(test.GetCell(1, 0).Color.ToString(), "4286644096"); }
public void TestingUndoRedo() { List <string> undoInput = new List <string>(); SpreadSheet test = new SpreadSheet(50, 26); test.GetCell(1, 0).Text = "50"; undoInput.Add("0"); undoInput.Add("0"); undoInput.Add("txt"); undoInput.Add(string.Empty); test.AddUndo(undoInput); test.Undo(); Assert.AreEqual(string.Empty, test.GetCell(1, 0).ValueStr); test.Redo(); Assert.AreEqual(test.GetCell(1, 0).ValueStr, "50"); }