Пример #1
0
        public void load_products()
        {
            var op = new Operator();
            var sm = SnackMachineFactory.Create();

            op.LoadSlots(sm, Product.GetProducts());

            sm.ValidateSlots().Should().BeTrue();
        }
Пример #2
0
        public void Return_money_empties_money_in_transaction()
        {
            var snackMachine = SnackMachineFactory.Create();

            snackMachine.InsertMoney(Money.Dollar);

            snackMachine.ReturnMoney();

            snackMachine.MoneyInTransaction.Amount.Should().Be(0m);
        }
Пример #3
0
        public void remove_slots_and_validate()
        {
            var op = new Operator();
            var sm = SnackMachineFactory.Create();

            op.LoadSlots(sm, Product.GetProducts());

            sm.Slots.RemoveAt(0);

            sm.ValidateSlots().Should().BeFalse();
        }
Пример #4
0
        public void validate_slots_()
        {
            var sm = SnackMachineFactory.Create();

            sm.ValidateSlots().Should().BeTrue();
        }