Esempio n. 1
0
        static void Main(string[] args)
        {
            _dialogConsole = new DialogConsole();

            string input;
            string exitCommand = "exit";

            _dialogConsole.DisplayUser("Hello !");
            _dialogConsole.DisplayUser($"Welcome, type your name to create a bank account or \"{exitCommand}\" to exit the application");
            input = _dialogConsole.GetUserAnswer();

            if (input == exitCommand)
            {
                return;
            }

            _dialogConsole.DisplayUser($"Thank you {input} for creating your bank account");
            AccountInitialization(input);

            while (input != exitCommand)
            {
                DisplayAvailableActions();
                input = _dialogConsole.GetUserAnswer();

                _interpreter.ExecuteAction(input, _myAccount);
            }
        }
 public void WhenWithdrawActionThenWithdrawDialog()
 {
     _interpreter.ExecuteAction(ActionEnum.Withdraw.ToString(), _account);
     _bankerMock.Verify(b => b.Withdraw(It.IsAny <Account>(), It.IsAny <decimal>(), It.IsAny <string>()), Times.Once);
 }