Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            var clock            = new Clock();
            var transactionStore = new InMemoryTransactionStore(clock);

            var console          = new Console();
            var statementPrinter = new BankStatementPrinter(console);

            Account account = new Account(transactionStore, statementPrinter);

            account.Deposit(1000);
            account.Withdrawal(300);
            account.Withdrawal(50);
            account.Deposit(500);

            account.PrintStatement();
        }
 public InMemoryTransactionStoreTests()
 {
     clock = new Mock <IClock>();
     clock.Setup(t => t.TodayAsString()).Returns("10/01/2020");
     transactionStore = new InMemoryTransactionStore(clock.Object);
 }