Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
        public void TestButtonClickInRepeater()
        {
            ButtonTester button1 = new ButtonTester("Button1", CurrentWebForm);
            LabelTester  label1  = new LabelTester("Label1", CurrentWebForm);

            button1.Click();

            ButtonTester innerButton1 = new ButtonTester("btnInner", repeater3.Item(0));
            ButtonTester innerButton2 = new ButtonTester("btnInner", repeater3.Item(1));

            innerButton1.Click();
            Assert.AreEqual("Thing 1", label1.Text);

            innerButton2.Click();
            Assert.AreEqual("Thing 2", label1.Text);
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
0
        public void TestLabelInRepeaterRow()
        {
            LabelTester label1 = new LabelTester("Label1", repeater2.Item(0));

            Assert.AreEqual("Go Suns!", label1.Text);
        }