public void EmptyStringNumberTest_InvalidCast() { var cell = new GoogleDataCell() { Value = string.Empty, Formatted = string.Empty, DataType = ColumnDataType.Number }; cell.ToJson(); }
public void Date_Cell_Test() { var cell = new GoogleDataCell() { Value = new DateTime(2011, 10, 24), Formatted = string.Empty, DataType = ColumnDataType.Date }; Assert.AreEqual("{\"v\":new Date(2011,9,24),\"f\":\"\"}", cell.ToJson()); }
public void Char_Cell_Test() { var cell = new GoogleDataCell() { Value = 'a', Formatted = string.Empty, DataType = ColumnDataType.String }; Assert.AreEqual("{\"v\":\"a\",\"f\":\"\"}", cell.ToJson()); }
public void Bool_Cell_Test() { var cell = new GoogleDataCell() { Value = true, Formatted = string.Empty, DataType = ColumnDataType.Boolean }; Assert.AreEqual("{\"v\":\"true\",\"f\":\"\"}", cell.ToJson()); cell.Value = false; Assert.AreEqual("{\"v\":\"false\",\"f\":\"\"}", cell.ToJson()); }
public void Null_Cell_Value_Test() { var cell = new GoogleDataCell() { Value = null, Formatted = string.Empty, DataType = ColumnDataType.Number }; Assert.AreEqual("{\"v\":null,\"f\":\"\"}", cell.ToJson()); }