Example #1
0
        public void IfGettingCachedFormulaTypeShouldNotThrowErrorIfCellTypeIsNumeric()
        {
            _objectToTest = new SXSSFCell(null, CellType.Formula);
            _objectToTest.SetCellFormula("SUM(C4:E4)");

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