Esempio n. 1
0
        public void CustomFunctionNodeVisitTest()
        {
            var node = new CustomFunctionNode("Add");
            var visitor = Mock.Create<INodeVisitor>();
            Mock.Arrange(() => visitor.Visit(node)).MustBeCalled();

            node.AcceptVisitor(visitor);
        }
Esempio n. 2
0
        private CustomFunctionNode ToCustomFunctionNodeNode(ExpressionObjectBase customFunction)
        {
            var customFunctionNode = new CustomFunctionNode(customFunction.FunctionName);

            foreach (var connection in customFunction.ConnectorsIn)
            {
                customFunctionNode.Expressions.Add(ToExpressionNode(connection.Connection.Source.Connection.Source.Owner,
                    connection.Connection.Source.Connection));
            }

            return customFunctionNode;
        }
Esempio n. 3
0
 public void CustomFunctionNodeCtorTest()
 {
     var func = new CustomFunctionNode("Add");
     Assert.AreEqual(ExpressionNodeType.CustomFunction, func.NodeType);
     Assert.AreEqual("Add", func.FunctionName);
     Assert.IsNotNull(func.Expressions);
 }