コード例 #1
0
        public void ShouldChoosePlainTablePlusThLayoutWhenHasThsButDoesNotHaveThead()
        {
            Selenium.Setup(o => o.GetXpathCount("id('tableId')/thead")).Returns(0);
            Selenium.Setup(o => o.GetXpathCount("id('tableId')//th")).Returns(1);

            var chooser = new TableLayoutChooser(Selenium.Object, "tableId");
            ITableLayout layout = chooser.GetLayout();

            Assert.IsInstanceOfType(layout, typeof(PlainTablePlusThLayout));
        }
コード例 #2
0
        public void ShouldChooseFullTableLayoutWhenHasTheadAndThs()
        {
            Selenium.Setup(o => o.GetXpathCount("id('tableId')/thead")).Returns(1);
            Selenium.Setup(o => o.GetXpathCount("id('tableId')//th")).Returns(1);

            var chooser = new TableLayoutChooser(Selenium.Object, "tableId");
            ITableLayout layout = chooser.GetLayout();

            Assert.IsInstanceOfType(layout, typeof(FullTableLayout));
        }