private void ExecuteOperation(InvokeOperator <string> executeOperator, Tree <string> input, int branchCount) { TypedValue executeResult = TypedValue.Void; if (executeOperator.CanInvoke(new TypedValue(new SlimInstruction()), string.Empty, input)) { executeResult = executeOperator.Invoke(new TypedValue(new SlimInstruction()), string.Empty, 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(InvokeOperator<string> executeOperator, Tree<string> input, int branchCount) { TypedValue executeResult = TypedValue.Void; if (executeOperator.CanInvoke(new TypedValue(new SlimInstruction()), string.Empty, input)) { executeResult = executeOperator.Invoke(new TypedValue(new SlimInstruction()), string.Empty, input); } result = executeResult.GetValue<Tree<string>>(); Assert.IsFalse(result.IsLeaf); Assert.AreEqual(branchCount, result.Branches.Count); Assert.AreEqual("step", result.Branches[0].Value); }