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); }
public void TestFooterTemplate() { RepeaterTester footer = new RepeaterTester("footerRepeater", false, false, true); AssertFiveThings(footer, "footerLabel"); Assert.AreEqual("footer", new LabelTester("nestedFooterLabel", footer.Footer).Text); }
public void TestSeparatorTemplate() { RepeaterTester separator = new RepeaterTester("separatorRepeater", false, true, false); AssertFiveThings(separator, "separatorLabel"); AssertFourSeparators(separator, "nestedSeparatorLabel"); }
public void TestHeaderTemplate() { RepeaterTester header = new RepeaterTester("headerRepeater", true, false, false); AssertFiveThings(header, "headerLabel"); Assert.AreEqual("header", new LabelTester("nestedHeaderLabel", header.Header).Text); }
public void TestNestedRepeater() { RepeaterTester innerRepeater1 = new RepeaterTester("innerRepeater1", repeater1.Item(0)); RepeaterTester innerRepeater2 = new RepeaterTester("innerRepeater1", repeater1.Item(1)); Assert.AreEqual(2, innerRepeater1.ItemCount); Assert.AreEqual(4, innerRepeater2.ItemCount); }
private void AssertFiveThings(RepeaterTester tester, string labelId) { Assert.AreEqual(5, tester.ItemCount); Assert.AreEqual("one", new LabelTester(labelId, tester.Item(0)).Text); Assert.AreEqual("two", new LabelTester(labelId, tester.Item(1)).Text); Assert.AreEqual("three", new LabelTester(labelId, tester.Item(2)).Text); Assert.AreEqual("four", new LabelTester(labelId, tester.Item(3)).Text); Assert.AreEqual("five", new LabelTester(labelId, tester.Item(4)).Text); }
public void TestAllTemplates() { RepeaterTester all = new RepeaterTester("allRepeater", true, true, true); AssertFiveThings(all, "allLabel"); AssertFourSeparators(all, "allSeparatorTemplateLabel"); Assert.AreEqual("header", new LabelTester("allHeaderTemplateLabel", all.Header).Text); Assert.AreEqual("footer", new LabelTester("allFooterTemplateLabel", all.Footer).Text); }
protected override void SetUp() { base.SetUp(); repeater1 = new RepeaterTester("Repeater1", CurrentWebForm); repeater2 = new RepeaterTester("Repeater2", CurrentWebForm); repeater3 = new RepeaterTester("Repeater3", CurrentWebForm); Browser.GetPage(BaseUrl + "/AspTester/RepeaterTestPage.aspx"); }
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); }
public void TestAlternatingItemTemplate() { RepeaterTester alternating = new RepeaterTester("alternatingRepeater"); AssertFiveThings(alternating, "alternatingLabel"); }