Пример #1
0
        public void StandardBouquetCost()
        {
            FlowerShopOrder flowerShopOrder = new FlowerShopOrder("standard", 0);

            decimal checkValue = 19.99M;
            decimal testValue  = flowerShopOrder.Subtotal;

            Assert.AreEqual(checkValue, testValue);
        }
Пример #2
0
        public void NonLocalZipCodeTrySameDay()
        {
            FlowerShopOrder flowerShopOrder = new FlowerShopOrder("standard", 0);

            decimal checkValue = 19.99M;
            decimal testValue  = flowerShopOrder.DeliveryTotal(true, "99999");

            Assert.AreEqual(checkValue, testValue);
        }
Пример #3
0
        public void AnotherZipCodeNoSameDay()
        {
            FlowerShopOrder flowerShopOrder = new FlowerShopOrder("standard", 0);

            decimal checkValue = 6.99M;
            decimal testValue  = flowerShopOrder.DeliveryTotal(false, "33559");

            Assert.AreEqual(checkValue, testValue);
        }
Пример #4
0
        public void AnotherZipCodeWithSameDay()
        {
            FlowerShopOrder flowerShopOrder = new FlowerShopOrder("standard", 0);

            decimal checkValue = 9.98M;
            decimal testValue  = flowerShopOrder.DeliveryTotal(true, "28478");

            Assert.AreEqual(checkValue, testValue);
        }
Пример #5
0
        public void SameDayShippingLocal()
        {
            FlowerShopOrder flowerShopOrder = new FlowerShopOrder("standard", 0);

            decimal checkValue = 5.99M;
            decimal testValue  = flowerShopOrder.DeliveryTotal(true, "10005");

            Assert.AreEqual(checkValue, testValue);
        }
Пример #6
0
        public void LocalShippingNoCost()
        {
            FlowerShopOrder flowerShopOrder = new FlowerShopOrder("standard", 0);

            decimal checkValue = 0;
            decimal testValue  = flowerShopOrder.DeliveryTotal(false, "10005");

            Assert.AreEqual(checkValue, testValue);
        }
Пример #7
0
        public void UpgradeBouquetCost()
        {
            FlowerShopOrder flowerShopOrder = new FlowerShopOrder("standard", 3);

            decimal checkValue = 28.96M;
            decimal testValue  = flowerShopOrder.Subtotal;

            Assert.AreEqual(checkValue, testValue);
        }
Пример #8
0
        public void TestTotal(bool sameDayDelivery, string zipCode, double expectedResult)
        {
            FlowerShopOrder fso = new FlowerShopOrder("vase", 12);

            decimal actualResult = fso.GrandTotal(sameDayDelivery, zipCode);

            decimal expectedDecimalResult = decimal.Parse(expectedResult.ToString());

            Assert.AreEqual(expectedDecimalResult, actualResult);
        }
Пример #9
0
        public void TestSubtotal()
        {
            // Arrange

            FlowerShopOrder ex = new FlowerShopOrder("vase", 12);

            //FlowerShopOrder ex = new FlowerShopOrder("flowers", 12);

            // Act
            decimal actualResult = ex.Subtotal;

            // Assert
            Assert.AreEqual(55.87M, actualResult);
        }