Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public ProductController(IProductService productService, [Dependency("Size")] ISelectList selectList)
 {
     _productService = productService;
     _sizeSelectList = selectList;
 }
Exemplo n.º 3
0
 public SelectListController(ISelectList SelectList)
 {
     this.SelectList = SelectList;
 }