Exemplo n.º 1
0
        public void Vend_WhenCoffeeOrderInTransactionHandlerAndSufficientFunds_ReturnsCoffeeOrder()
        {
            var coffeeOrder = CreateCoffeeOrder();

            _transactionHandler.AddCoffeeOrder(coffeeOrder);
            _transactionHandler.AddFunds(Denomination.Twenty);

            var vendedCoffeeOrder = _transactionHandler.Vend();

            Assert.AreEqual(coffeeOrder, vendedCoffeeOrder);
        }
Exemplo n.º 2
0
 private void btnAddPayment_Click(object sender, EventArgs e)
 {
     _transactionHandler.AddFunds((Denomination)cbAmount.SelectedItem);
     UpdateCurrentPayment();
     SetStatus();
 }