Example #1
0
        public void CheckIfSummaryPriceIsProperlyCalculated()
        {
            var task1 = new Task1(this.Driver);
            task1.NavigateToPage(GetHost() + "task_1");
            task1.AddAmount("product1", "100");

            var elementName = task1.GetProductName();
            var productPrice = task1.GetProductPrice();
            var psummaryQuantity = task1.GetQuantity();
            double abc = double.Parse(productPrice)*100;

            Assert.AreEqual(abc.ToString("F"), task1.GetSummaryPrice().Split(' ')[0], "summary price in basket is improper, should be {0}", productPrice);
            Assert.AreEqual("100", psummaryQuantity);
        }