public static bool IsMatch(ExecuteCommand command, ExecuteOperator<Cell> executor, Tree<Cell> parameters) { var processor = new CellProcessorBase(); processor.AddOperator(new ParseMemberName()); ((CellOperator) executor).Processor = processor; return executor.CanExecute(new TypedValue(new ExecuteContext(command, null, new TypedValue("stuff"))), parameters); }
public static bool IsMatch(ExecuteCommand command, ExecuteOperator <Cell> executor, Tree <Cell> parameters) { var processor = new CellProcessorBase(); processor.AddOperator(new ParseMemberName()); ((CellOperator)executor).Processor = processor; return(executor.CanExecute(new TypedValue(new ExecuteContext(command, new TypedValue("stuff"))), parameters)); }
private void ExecuteOperation(ExecuteOperator <string> executeOperator, Tree <string> input, int branchCount) { TypedValue executeResult = TypedValue.Void; if (executeOperator.CanExecute(TypedValue.Void, input)) { executeResult = executeOperator.Execute(TypedValue.Void, input); } result = executeResult.GetValue <Tree <string> >(); Assert.IsFalse(result.IsLeaf); Assert.AreEqual(branchCount, result.Branches.Count); Assert.AreEqual("step", result.Branches[0].Value); }
private void ExecuteOperation(ExecuteOperator<string> executeOperator, Tree<string> input, int branchCount) { TypedValue executeResult = TypedValue.Void; if (executeOperator.CanExecute(TypedValue.Void, input)) { executeResult = executeOperator.Execute(TypedValue.Void, input); } result = executeResult.GetValue<Tree<string>>(); Assert.IsFalse(result.IsLeaf); Assert.AreEqual(branchCount, result.Branches.Count); Assert.AreEqual("step", result.Branches[0].Value); }