Execute() public method

public Execute ( IEnumerable arguments, ParsingContext context ) : CompileResult
arguments IEnumerable
context ParsingContext
return ExcelFormulaParser.Engine.ExpressionGraph.CompileResult
Ejemplo n.º 1
0
 public void RowShouldReturnRowSuppliedAddress()
 {
     var func = new Row();
     var parsingContext = ParsingContext.Create();
     parsingContext.ExcelDataProvider = MockRepository.GenerateStub<ExcelDataProvider>();
     var result = func.Execute(FunctionsHelper.CreateArgs("A3"), parsingContext);
     Assert.AreEqual(3, result.Result);
 }
Ejemplo n.º 2
0
 public void RowShouldReturnRowFromCurrentScopeIfNoAddressIsSupplied()
 {
     var func = new Row();
     var parsingContext = ParsingContext.Create();
     var rangeAddressFactory = new RangeAddressFactory(MockRepository.GenerateStub<ExcelDataProvider>());
     parsingContext.Scopes.NewScope(rangeAddressFactory.Create("A2"));
     var result = func.Execute(Enumerable.Empty<FunctionArgument>(), parsingContext);
     Assert.AreEqual(2, result.Result);
 }