public void ArrayBindingWithIndexedNodes() { var node = new CompositeNode("unnamed"); var indexNode = new IndexedNode("emails"); node.AddChildNode(indexNode); indexNode.AddChildNode(new LeafNode(typeof (String), "", "e1")); indexNode.AddChildNode(new LeafNode(typeof (String), "", "e2")); Assert.AreEqual(new[] {"e1", "e2"}, binder.BindParameter(typeof (String[]), "emails", node)); }
public void ArrayBindingWithIndexedNodes() { var node = new CompositeNode("unnamed"); var indexNode = new IndexedNode("emails"); node.AddChildNode(indexNode); indexNode.AddChildNode(new LeafNode(typeof(String), "", "e1")); indexNode.AddChildNode(new LeafNode(typeof(String), "", "e2")); Assert.AreEqual(new[] { "e1", "e2" }, binder.BindParameter(typeof(String[]), "emails", node)); }
private static CompositeNode GetParamsNode(int expectedValue) { var paramsNode = new CompositeNode("root"); var listNode = new IndexedNode("myList"); paramsNode.AddChildNode(listNode); listNode.AddChildNode(new LeafNode(typeof (int), "", expectedValue)); return paramsNode; }
private static CompositeNode GetParamsNode(int expectedValue) { var paramsNode = new CompositeNode("root"); var listNode = new IndexedNode("myList"); paramsNode.AddChildNode(listNode); listNode.AddChildNode(new LeafNode(typeof(int), "", expectedValue)); return(paramsNode); }