Esempio n. 1
0
        public void Complex_NoAdditions()
        {
            Order order = new Order
            {
                Complex  = true,
                Drink    = "Вода",
                Food     = "Хлеб",
                Addition = new Dictionary <string, int> {
                }
            };
            int expected = 90;

            FoodDispenserModel _model = new FoodDispenserModel();
            int actual = _model.CalculatePrice(order);

            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public void Complex_MostExpensiveAdditions_InIt()
        {
            Order order = new Order
            {
                Complex  = true,
                Drink    = "Эспрессо",
                Food     = "Булочка",
                Addition = new Dictionary <string, int>
                {
                    ["Сахар"]   = 4,
                    ["Молоко"]  = 1,
                    ["Сироп"]   = 1,
                    ["Ветчина"] = 1,
                    ["Джем"]    = 1
                }
            };
            int expected = 105;

            FoodDispenserModel _model = new FoodDispenserModel();
            int actual = _model.CalculatePrice(order);

            Assert.AreEqual(expected, actual);
        }