示例#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();
        }
 public void WhenIReleaseTheChange()
 {
     _changeReleased = _vendingMachine.ReleaseChange();
 }
示例#3
0
        public ActionResult ReleaseChange()
        {
            var releasedChange = _vendingMachine.ReleaseChange();

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