public void TestRow() { //throw new NotImplementedException(); Function target = new Row(); { ValueEval[] args = { EvalFactory.CreateRefEval("C5"), }; double actual = NumericFunctionInvoker.Invoke(target, args); Assert.AreEqual(5, actual, 0D); } { ValueEval[] args = { EvalFactory.CreateAreaEval("E2:H12", new ValueEval[44]), }; double actual = NumericFunctionInvoker.Invoke(target, args); Assert.AreEqual(2, actual, 0D); } }
public void TestCountIfWithCriteriaReference() { ValueEval[] values = { new NumberEval(22), new NumberEval(25), new NumberEval(21), new NumberEval(25), new NumberEval(25), new NumberEval(25), }; AreaEval arg0 = EvalFactory.CreateAreaEval("C1:C6", values); ValueEval criteriaArg = EvalFactory.CreateRefEval("A1", new NumberEval(25)); ValueEval[] args = { arg0, criteriaArg, }; double actual = NumericFunctionInvoker.Invoke(new Countif(), args); Assert.AreEqual(4, actual, 0D); }
/** * Simulates call: T(A1) * where cell A1 has the specified innerValue */ private ValueEval invokeTWithReference(ValueEval innerValue) { ValueEval arg = EvalFactory.CreateRefEval("$B$2", innerValue); return(invokeT(arg)); }