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)); }
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)); }