public void TestGetCellContents4() { TestableSpreadsheet sheet = new TestableSpreadsheet(); sheet.SetCellContents("a2", 2.5); Assert.AreEqual(2.5, sheet.GetCellContents("a2")); }
public void TestGetCellContents5() { TestableSpreadsheet sheet = new TestableSpreadsheet(); sheet.SetCellContents("a2", "2+5+x41+y23"); Assert.AreEqual(new Formulas.Formula("2+5+x41+y23").ToString(), sheet.GetCellContents("a2")); }
public void GetCellValue2() { TestableSpreadsheet sheet = new TestableSpreadsheet(); sheet.SetContentsOfCell("A1", "5"); Assert.AreEqual(5.0, sheet.GetCellValue("A1")); }
public void TestGetCellContents3() { TestableSpreadsheet sheet = new TestableSpreadsheet(); sheet.SetCellContents("a2", "testing"); Assert.AreEqual("testing", sheet.GetCellContents("a2")); }
public void SetCellContents5() { TestableSpreadsheet sheet = new TestableSpreadsheet(); Formulas.Formula f1 = new Formulas.Formula("13+a1"); Formulas.Formula f2 = new Formulas.Formula("12+a2"); sheet.SetCellContents("a1", "45"); sheet.SetCellContents("a2", f1); sheet.SetCellContents("a1", f2); }
public void TestGetNames1() { TestableSpreadsheet sheet = new TestableSpreadsheet(); sheet.SetCellContents("a1", "a-one"); sheet.SetCellContents("a2", "a-two"); sheet.SetCellContents("a3", "a-three"); String s = ""; foreach (string t in sheet.GetNamesOfAllNonemptyCells()) { s = s + t; } Assert.AreEqual("A1A2A3", s); }
public void SetCellContents4() { TestableSpreadsheet sheet = new TestableSpreadsheet(); Formulas.Formula f1 = new Formulas.Formula("13+a1"); Formulas.Formula f2 = new Formulas.Formula("a2+a1"); sheet.SetCellContents("a1", 45); sheet.SetCellContents("a2", f1); sheet.SetCellContents("a3", f2); string s = ""; foreach (string t in sheet.SetCellContents("a1", "12")) { s = s + t; } Assert.AreEqual("A1A2A3", s); }
public void SetCellContents1() { TestableSpreadsheet sheet = new TestableSpreadsheet(); sheet.SetCellContents("a1", null); }
public void SetCellContents9() { TestableSpreadsheet sheet = new TestableSpreadsheet(); sheet.SetCellContents("test", ""); }
public void SetCellContents6() { TestableSpreadsheet sheet = new TestableSpreadsheet(); sheet.SetCellContents(null, new Formulas.Formula("1+2")); }
public void SetCellContents2() { TestableSpreadsheet sheet = new TestableSpreadsheet(); sheet.SetCellContents(null, "test"); }