public void Controls_Should_Register_With_NameScope() { var root = new TestRoot { Child = new Border { Name = "foo", Child = new Border { Name = "bar", } } }; root.ApplyTemplate(); Assert.Same(root.FindControl <Border>("foo"), root.Child); Assert.Same(root.FindControl <Border>("bar"), ((Border)root.Child).Child); }
public void Controls_Should_Register_With_NameScope() { var root = new TestRoot { Child = new Border { Name = "foo", Child = new Border { Name = "bar", } } }; root.ApplyTemplate(); Assert.Same(root.FindControl<Border>("foo"), root.Child); Assert.Same(root.FindControl<Border>("bar"), ((Border)root.Child).Child); }