public void Executor_ValueOnly_ReturnsValue()
        {
            var valNode = new ValueNode("simple", Token.Word);

            var tree = new ParseTree();
            tree.Root.AddChild(valNode);

            var result = _executor.Execute(tree);

            Assert.AreEqual(valNode.Value, result.Response.First(), "When only given a value node, then the value should simple be returned as the result");
        }
Esempio n. 2
0
 private ResultNode GetResultNode(ValueNode node)
 {
     return new ResultNode(node.Value, node.Type, node.Value);
 }