public MainPage Add(string Product, string Price, string Quantity, string Stock, string Order, string Level) { AllProducts.Click(); CreateNew.Click(); ProductName.SendKeys(Product); CategoryID.FindElement(By.XPath("//option[. = 'Seafood']")).Click(); SupplierID.FindElement(By.XPath("//option[. = 'Leka Trading']")).Click(); UnitPrice.SendKeys(Price); QuantityPerUnit.SendKeys(Quantity); UnitsInStock.SendKeys(Stock); UnitsOnOrder.SendKeys(Order); ReorderLevel.SendKeys(Level); Confirm.Click(); return(new MainPage(driver)); }
public override int GetHashCode() { var hashCode = -931275965; hashCode = hashCode * -1521134295 + ProductID.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ProductName); hashCode = hashCode * -1521134295 + EqualityComparer <Supplier> .Default.GetHashCode(Supplier); hashCode = hashCode * -1521134295 + EqualityComparer <Category> .Default.GetHashCode(Category); hashCode = hashCode * -1521134295 + UnitsInStock.GetHashCode(); hashCode = hashCode * -1521134295 + UnitsOnOrder.GetHashCode(); hashCode = hashCode * -1521134295 + ReorderLevel.GetHashCode(); return(hashCode); }
public MainPage Exist() { AllProducts.Click(); TestProduct.Click(); Assert.AreEqual(ProductName.GetAttribute("value"), "Test Product"); Assert.AreEqual(CategoryID.FindElement(By.XPath("//option[. = 'Seafood']")).GetAttribute("text"), "Seafood"); Assert.AreEqual(SupplierID.FindElement(By.XPath("//option[. = 'Leka Trading']")).GetAttribute("text"), "Leka Trading"); Assert.AreEqual(UnitPrice.GetAttribute("value"), "111,0000"); Assert.AreEqual(QuantityPerUnit.GetAttribute("value"), "222"); Assert.AreEqual(UnitsInStock.GetAttribute("value"), "333"); Assert.AreEqual(UnitsOnOrder.GetAttribute("value"), "444"); Assert.AreEqual(ReorderLevel.GetAttribute("value"), "555"); Home.Click(); logoutField.Click(); return(new MainPage(driver)); }
public override int GetHashCode() { unchecked { var hashCode = Id; hashCode = (hashCode * 397) ^ (ProductName != null ? ProductName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ SupplierId; hashCode = (hashCode * 397) ^ CategoryId; hashCode = (hashCode * 397) ^ (QuantityPerUnit != null ? QuantityPerUnit.GetHashCode() : 0); hashCode = (hashCode * 397) ^ UnitPrice.GetHashCode(); hashCode = (hashCode * 397) ^ UnitsInStock.GetHashCode(); hashCode = (hashCode * 397) ^ UnitsOnOrder.GetHashCode(); hashCode = (hashCode * 397) ^ ReorderLevel.GetHashCode(); hashCode = (hashCode * 397) ^ Discontinued.GetHashCode(); return(hashCode); } }
/// <summary> /// Returns values in the collections. /// </summary> /// <returns>IEnumerator object</returns> public IEnumerator PropertyAndValuesCollection() { yield return("Product ID: " + ID.ToString()); yield return("Product Name: " + ProductName); yield return("Supplier ID: " + SupplierID.ToString()); yield return("Category ID: " + CategoryID.ToString()); yield return("Quantity Per Unit: " + QuantityPerUnit); yield return("Unit Price: " + UnitPrice.ToString("c")); yield return("Units in Stock: " + UnitsInStock.ToString()); yield return("Units On Order: " + UnitsOnOrder.ToString()); yield return("ReOrder Level: " + ReOrderLevel.ToString()); }