Esempio n. 1
0
        public void ConvertNode_SetChildren_Works()
        {
            ConvertNode      instance = new ConvertNode(null, typeof(string));
            List <QueryNode> children = new QueryNode[] { new ConstantNode("abc123") }.ToList();

            instance.SetChildren(children);
            Assert.Same(children[0], instance.Source);
            Assert.Equal(typeof(string), instance.TargetType);
        }
Esempio n. 2
0
        public void ConvertNode_SetChildren_ThrowsException()
        {
            ConvertNode instance = new ConvertNode(null, typeof(string));

            Assert.ThrowsAny <Exception>(() => instance.SetChildren(Array.Empty <QueryNode>()));
        }