public void SumInvalidArgumentTest() { SumSpreadsheetCommand cmd = new SumSpreadsheetCommand(""); var mockSheet = new MockSheet_3x5(); mockSheet[0, 0] = 1; mockSheet[0, 1] = 2; mockSheet[1, 1] = 3; var result = cmd.Execute(mockSheet, "0", "0", "1", "1"); Assert.IsFalse(result.Success); }
public void BasicSumTest() { SumSpreadsheetCommand cmd = new SumSpreadsheetCommand(""); var mockSheet = new MockSheet_3x5(); mockSheet[0, 0] = 1; mockSheet[0, 1] = 2; mockSheet[1, 1] = 3; var result = cmd.Execute(mockSheet, "0", "0", "1", "1", "2", "2"); Assert.IsTrue(result.Success); Assert.AreEqual(result.Spreadsheet[2, 2], "6"); }