Ejemplo n.º 1
0
        public void Setup()
        {
            // TODO: Setup acceptance tests to work with both EF and ADO payment DAOs
            _product          = null;
            _changeReleased   = 0;
            _transactionScope = new TransactionScope();
            var efDao            = new EFPaymentDAO();
            var paymentProcessor = new CoinPaymentProcessor(efDao);

            _vendingMachine = new VendingMachine(paymentProcessor);
            _vendingMachine.ReleaseChange();
        }
Ejemplo n.º 2
0
 public void WhenIReleaseTheChange()
 {
     _changeReleased = _vendingMachine.ReleaseChange();
 }
Ejemplo n.º 3
0
        public ActionResult ReleaseChange()
        {
            var releasedChange = _vendingMachine.ReleaseChange();

            return(RedirectToAction("IndexWithChange", new { ReleasedChange = releasedChange }));
        }