Exemple #1
0
 public Order(BeverageKind beverageKind, bool extraHot, double money, int sugar)
 {
     BeverageKind = beverageKind;
     ExtraHot     = extraHot;
     Money        = money;
     Sugar        = sugar;
 }
        public void Return_message_When_10_cents_is_not_enough_money_for_a_coffee(BeverageKind beverageKind, double missingMoney)
        {
            var actual = _logic.Translate(
                new Order
            {
                BeverageKind = beverageKind,
                Sugar        = 0,
                Money        = 0.1
            });

            Check.That(actual).IsEqualTo($"M:Not enough money, missing {missingMoney}");
        }
 public Product GetBeverage(BeverageKind _beverageKind)
 {
     return(_beverages[_beverageKind]);
 }
        public void Return_1_drink_0_sugar_0_stick_When_customer_ask_for_drink_with_enough_money(BeverageKind beverageKind, double money, string expected)
        {
            var actual = _logic.Translate(
                new Order
            {
                BeverageKind = beverageKind,
                Sugar        = 0,
                Money        = money
            });

            Check.That(actual).IsEqualTo(expected);
        }
        public void Return_1_drink_2_sugar_1_stick_When_customer_ask_for_a_specific_drink(BeverageKind beverageKind, string expected)
        {
            var actual = _logic.Translate(
                new Order
            {
                BeverageKind = beverageKind,
                Sugar        = 2
            });

            Check.That(actual).IsEqualTo(expected);
        }
        public void Return_1_extra_hot_drink_0_sugar_0_stick_When_customer_ask_for_a_extra_hot_drink(BeverageKind beverageKind, string expected)
        {
            var actual = _logic.Translate(
                new Order
            {
                BeverageKind = beverageKind,
                Sugar        = 0,
                ExtraHot     = true
            });

            Check.That(actual).IsEqualTo(expected);
        }