public void SumProductWithFalseBooleanInputReturnsPoundValue() { var function = new SumProduct(); var result = function.Execute(FunctionsHelper.CreateArgs(3, false), this.ParsingContext); Assert.AreEqual(eErrorType.Value, ((ExcelErrorValue)result.Result).Type); }
public void SumProductWithIntegerInputsReturnsCorrectValue() { var function = new SumProduct(); var result = function.Execute(FunctionsHelper.CreateArgs(4, 5, 6), this.ParsingContext); Assert.AreEqual(120d, result.Result); }
public void SumProductWithDoubleInputsReturnsCorrectValue() { var function = new SumProduct(); var result = function.Execute(FunctionsHelper.CreateArgs(5.6, 5.7), this.ParsingContext); Assert.AreEqual(31.92d, (double)result.Result, 0.000001); }
public void SumProductWithDateAsStringInputReturnsCorrectValue() { var function = new SumProduct(); var result = function.Execute(FunctionsHelper.CreateArgs("5/5/2017", 2), this.ParsingContext); Assert.AreEqual(eErrorType.Value, ((ExcelErrorValue)result.Result).Type); }
public void SumProductWithInvalidArgumentReturnsPoundValue() { var func = new SumProduct(); var args = FunctionsHelper.CreateArgs(); var result = func.Execute(args, this.ParsingContext); Assert.AreEqual(eErrorType.Value, ((ExcelErrorValue)result.Result).Type); }