Пример #1
0
        public void ChangeSelectedValueOfDDLFromButton()
        {
            IButton     selectNewDDLValue = Browser.Button("selectNewDDLValue");
            IButton     selectNewDDLValueUsingSelectedProperty = Browser.Button("selectNewDDLValueUsingSelectedProperty");
            ISelectList dropDownListCallback = Browser.SelectList("dropDownListCallback");

            selectNewDDLValue.Click();
            Assert.AreEqual(3, dropDownListCallback.SelectedOption.Index);
            Assert.AreEqual("Text of fourth", dropDownListCallback.SelectedItem);

            selectNewDDLValueUsingSelectedProperty.Click();
            Assert.AreEqual(2, dropDownListCallback.SelectedOption.Index);
            Assert.AreEqual("Text of third", dropDownListCallback.SelectedItem);
        }
Пример #2
0
 public ProductController(IProductService productService, [Dependency("Size")] ISelectList selectList)
 {
     _productService = productService;
     _sizeSelectList = selectList;
 }
Пример #3
0
 public SelectListController(ISelectList SelectList)
 {
     this.SelectList = SelectList;
 }