public void IfGettingCachedFormulaTypeShouldNotThrowErrorIfCellTypeIsNumeric() { _objectToTest = new SXSSFCell(null, CellType.Formula); _objectToTest.SetCellFormula("SUM(C4:E4)"); Assert.AreEqual(CellType.Numeric, _objectToTest.CachedFormulaResultType); }
public void IfGettingCellFormulaShouldReturnFormulaValueIfValidCellType() { _objectToTest = new SXSSFCell(null, CellType.Formula); _objectToTest.SetCellFormula("SUM(C4:E4)"); Assert.AreEqual("SUM(C4:E4)", _objectToTest.CellFormula); }
public void IfSettingFormulaValueWithNullShouldChangeToBlankCell() { _objectToTest = new SXSSFCell(null, CellType.Formula); _objectToTest.SetCellFormula(null); Assert.AreEqual(CellType.Blank, _objectToTest.CellType); }
public void IfSettingFormulaValueShouldSetFormulaValue() { _objectToTest = new SXSSFCell(null, CellType.Formula); _objectToTest.SetCellFormula("SUM(C4:E4)"); Assert.AreEqual("SUM(C4:E4)", _objectToTest.CellFormula); }
public void IfCellTypeIsFormulaNumericCellValueShouldReturnPreEvaluatedFormulaValue() { _objectToTest = new SXSSFCell(null, CellType.Formula); _objectToTest.SetCellFormula("SUM(C4:E4)"); Assert.AreEqual(0.0, _objectToTest.NumericCellValue); }