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); }
public void ConvertNode_SetChildren_ThrowsException() { ConvertNode instance = new ConvertNode(null, typeof(string)); Assert.ThrowsAny <Exception>(() => instance.SetChildren(Array.Empty <QueryNode>())); }