public void ShowScanError_WhenCalled_ErrorTextDisplayed() { PriceDisplay display = new PriceDisplay(); display.ShowScanError(); Assert.AreEqual("Scanner error!", display.DisplayText); }
public void ShowPrice_WhenCalled_PriceDisplayed() { PriceDisplay display = new PriceDisplay(); display.ShowPrice(20.5); Assert.AreEqual("$20.50", display.DisplayText); }
public void ShowProductNotFound_WhenCalled_ProductNotFoundTextDisplayed() { PriceDisplay display = new PriceDisplay(); display.ShowProductNotFound("4567ff4"); Assert.AreEqual("Product with code: 4567ff4 was not found", display.DisplayText); }
public void ReviewPurchaseItems(string expectedShippingFee, string expectedItemCost, string expectedTotalPrice) { Assert.AreEqual(expectedShippingFee, PriceDisplay.ElementAt(0).Text, "Total Shipping fee did not matched."); Assert.AreEqual(expectedItemCost, PriceDisplay.ElementAt(1).Text, "Item Cost did not matched."); Assert.AreEqual(expectedTotalPrice, TotalPrice.Text, "Total Price did not matched."); Phone.SendKeys(Keys.Enter); // SubmitButton.Click(); DoPageTransition(); Assert.IsTrue(PurchaseTransactionLog.Displayed, "Transaction page is not displayed"); }