public void indexers_are_serialzied_after_a_semi_column()
 {
     var customer = new Customer();
     Expression<Func<object>> expr = () => customer.Orders[0].Lines;
     var property = new PropertyPathForIteratorVisitor().BuildPropertyPath(expr);
     property.TypePrefix.ShouldBe("Customer");
     property.TypeSuffix.ShouldBe("Orders:0.Lines");
 }
 public void the_prefix_and_suffix_starts_at_the_current_extension_method()
 {
     var customer = new Customer();
     Expression<Func<object>> expr = () => customer.Orders.Current().Lines;
     var property = new PropertyPathForIteratorVisitor().BuildPropertyPath(expr);
     property.TypePrefix.ShouldBe("Order");
     property.TypeSuffix.ShouldBe("Lines");
 }
 public void the_prefix_is_always_the_root_type_and_the_suffx_the_path_to_a_property()
 {
     var customer = new Customer();
     Expression<Func<object>> expr = () => customer.MainOrder.Lines;
     var property = new PropertyPathForIteratorVisitor().BuildPropertyPath(expr);
     property.TypePrefix.ShouldBe("Customer");
     property.TypeSuffix.ShouldBe("MainOrder.Lines");
 }
 public void a_foreach_and_multiple_current_items_produce_the_correct_html_output1()
 {
     var anchor = new XhtmlAnchor(null, null, () => null);
     var data = new Customer
                {
                    Orders = new List<Order>
                             {
                                 new Order {ProductName = "product1"},
                                 new Order {ProductName = "product2"}
                             }
                };
     var e = new InlineSharpViewElement(() => anchor.TextBox(()=>data.Orders.Current().ProductName).ForEach(data.Orders));
     e.OuterXml.ShouldBe("<input type=\"text\" name=\"Customer.Orders:0.ProductName\" value=\"product1\" />"
                         + "<input type=\"text\" name=\"Customer.Orders:1.ProductName\" value=\"product2\" />");
 }