public void SumsqWithLogicalValuesInputReturnsCorrectResult() { var function = new Sumsq(); var booleanFalse = function.Execute(FunctionsHelper.CreateArgs(false, 3, 6), this.ParsingContext); var booleanTrue = function.Execute(FunctionsHelper.CreateArgs(true, 3, 4), this.ParsingContext); Assert.AreEqual(45d, booleanFalse.Result); Assert.AreEqual(26d, booleanTrue.Result); }
public void SumsqWithDatesAsStringsInputReturnsCorrectValue() { var function = new Sumsq(); var result = function.Execute(FunctionsHelper.CreateArgs("5/5/2017", 6), this.ParsingContext); Assert.AreEqual(1836979636d, result.Result); }
public void SumsqWithNumericStringInputsReturnsCorrectValue() { var function = new Sumsq(); var result = function.Execute(FunctionsHelper.CreateArgs("2", "4"), this.ParsingContext); Assert.AreEqual(20d, result.Result); }
public void SumsqWithGeneralStringInputReturnsCorrectValue() { var function = new Sumsq(); var result = function.Execute(FunctionsHelper.CreateArgs("string", "string"), this.ParsingContext); Assert.AreEqual(eErrorType.Value, ((ExcelErrorValue)result.Result).Type); }
public void SumsqWithDoubleInputsReturnsCorrectValue() { var function = new Sumsq(); var result = function.Execute(FunctionsHelper.CreateArgs(2.5, 6.3), this.ParsingContext); Assert.AreEqual(45.94d, result.Result); }
public void SumsqWithIntegerInputsReturnsCorrectValue() { var function = new Sumsq(); var result = function.Execute(FunctionsHelper.CreateArgs(2, 5), this.ParsingContext); Assert.AreEqual(29d, result.Result); }
public void SumSqShouldNoCountTrueTrueInArray() { var func = new Sumsq(); var args = FunctionsHelper.CreateArgs(FunctionsHelper.CreateArgs(2, 4, true)); var result = func.Execute(args, _parsingContext); Assert.AreEqual(20d, result.Result); }
public void SumSqShouldIncludeTrueAsOne() { var func = new Sumsq(); var args = FunctionsHelper.CreateArgs(2, 4, true); var result = func.Execute(args, _parsingContext); Assert.AreEqual(21d, result.Result); }