Ejemplo n.º 1
0
        public void Increase_Balance_On_Current_Statement_After_A_Deposit()
        {
            var consoleMock = Substitute.For<IConsole>();
            var statementPrinter = new StatementPrinter(consoleMock);
            var account = new Account(new Transactions());
            var atm = new Atm(statementPrinter, account);

            // act
            atm.Deposit(2000);
            atm.PrintStatement();

            // assert
            consoleMock.Received().WriteLine(Arg.Is<string>(line => line.Contains("balance = 2000")));
        }
 public PrintStatementFeature()
 {
     clock.TodayAsString.Returns("01/11/2015", "02/11/2015", "10/11/2015");
     transactionRepository = new InMemoryTransactionReopsitory(clock);
     statementPrinter = new StatementPrinter(console);
 }
 public StatementPrinterShould()
 {
     printer = new StatementPrinter(console);
 }