Separator() public method

Returns a container for testing controls within the repeater's SeparatorTemplate. The 'separatorNum' is the separator to look for. separatorNum zero is the first separator (between the first and second items); separatorNum one is the second separator (between the second and third items); etc. This method will NOT check to see if the repeater is visible or if it has a SeparatorTemplate. Instead, you'll get a NotVisibleException when you attempt to use the tester instantiated with the result of this method.
public Separator ( int separatorNum ) : RepeaterSeparatorTester
separatorNum int The separator to get (zero-based)
return RepeaterSeparatorTester
Esempio n. 1
0
        public void TestDescriptions()
        {
            RepeaterTester all = new RepeaterTester("allRepeater", true, true, true);

            AssertDescription("RepeaterTester 'allRepeater'", all);
            AssertDescription("HeaderTemplate in RepeaterTester 'allRepeater'", all.Header);
            AssertDescription("Item #3 in RepeaterTester 'allRepeater'", all.Item(2));
            AssertDescription("Separator #2 in RepeaterTester 'allRepeater'", all.Separator(1));
            AssertDescription("FooterTemplate in RepeaterTester 'allRepeater'", all.Footer);
        }
Esempio n. 2
0
 private void AssertFourSeparators(RepeaterTester tester, string separatorLabelId)
 {
     Assert.AreEqual(" | ", new LabelTester(separatorLabelId, tester.Separator(0)).Text);
     Assert.AreEqual(" | ", new LabelTester(separatorLabelId, tester.Separator(1)).Text);
     Assert.AreEqual(" | ", new LabelTester(separatorLabelId, tester.Separator(2)).Text);
     Assert.AreEqual(" | ", new LabelTester(separatorLabelId, tester.Separator(3)).Text);
 }