public void CalculateOrderValue_WhenCalledWithEmptyList_ReturnsZero()
        {
            var helper = new OrderHelpers(_apiClient);

            var result = helper.CalculateOrderValue(new List <DishOrder>());

            Assert.AreEqual(0, result);
        }
        public void CalculateOrderValue_WhenCalledWithNull_ThrowsAnException()
        {
            var helper = new OrderHelpers(_apiClient);

            try
            {
                helper.CalculateOrderValue(null);
                Assert.Fail();
            }
            catch (Exception)
            {
                Assert.Pass();
            }
        }
        public void CalculateOrderValue_WhenOrderedDishWithoutExtras_ReturnsCorrectPrice(int quantity, decimal totalPrice)
        {
            var helper = new OrderHelpers(_apiClient);

            var result = helper.CalculateOrderValue(new List <DishOrder>
            {
                new DishOrder()
                {
                    DishIdentifier = "5f80c7de5508d7198e6e4821",
                    Quantity       = quantity
                }
            });

            Assert.AreEqual(result, totalPrice);
        }
        public void CalculateOrderValue_WhenOrderedDishWithExtra_ReturnsCorrectPrice(string dishIdentifier, string extrasId, int dishQuantity, decimal totalPrice)
        {
            var helper = new OrderHelpers(_apiClient);

            var result = helper.CalculateOrderValue(new List <DishOrder>
            {
                new DishOrder()
                {
                    DishIdentifier = dishIdentifier,
                    Quantity       = dishQuantity,
                    Extras         = new List <string> {
                        extrasId
                    }
                }
            });

            Assert.AreEqual(totalPrice, result);
        }