Exemplo n.º 1
0
        public void CashDepositHandler_UnknownDenomination_FailSilently()
        {
            var request = new CashDepositRequest(new Cash {
                Value = "353"
            });
            var hundredHandler     = new HundredRupeeCashHandler();
            var fiveHundredHandler = new FiveHundredRupeeCashHandler();
            var twoThousandHandler = new TwoThousandRupeeCashHandler();

            hundredHandler.SetNextHandler(fiveHundredHandler);
            fiveHundredHandler.SetNextHandler(twoThousandHandler);
            hundredHandler.HandleCashDeposit(request);
        }
Exemplo n.º 2
0
        public void CashDepositHandler_2000RupeeGoesTo_2000Tray()
        {
            var request = new CashDepositRequest(new Cash {
                Value = "2000"
            });
            var hundredHandler     = new HundredRupeeCashHandler();
            var fiveHundredHandler = new FiveHundredRupeeCashHandler();
            var twoThousandHandler = new TwoThousandRupeeCashHandler();

            hundredHandler.SetNextHandler(fiveHundredHandler);
            fiveHundredHandler.SetNextHandler(twoThousandHandler);
            hundredHandler.HandleCashDeposit(request);
        }