Example #1
0
        public AccountTests()
        {
            transactionStore = A.Fake <IStoreTransactions>();
            statementPrinter = A.Fake <IPrintBankStatements>();

            account = new Account(transactionStore, statementPrinter);
        }
Example #2
0
        private FakeTransactionsStore()
        {
            transactionsStoreMock = A.Fake <IStoreTransactions>();

            A.CallTo(() => transactionsStoreMock.All)
            .Returns(new List <Transaction>());
        }
        public void Setup()
        {
            _console          = Substitute.For <IConsole>();
            _clock            = Substitute.For <IClock>();
            _transactionStore = new TransactionStore(_clock);
            _statementPrinter = new StatementPrinter(_console);

            _account = new Account(_transactionStore, _statementPrinter);
        }
Example #4
0
 public Account(
     IProvideDate dateProvider,
     IStoreTransactions transactionsStore,
     IAmConsole console)
 {
     this.dateProvider = dateProvider
                         ?? throw new ArgumentNullException(nameof(dateProvider));
     this.transactionsStore = transactionsStore
                              ?? throw new ArgumentNullException(nameof(transactionsStore));
     this.console = console
                    ?? throw new ArgumentNullException(nameof(console));
 }
Example #5
0
 public void Setup()
 {
     _transactionStore = Substitute.For <IStoreTransactions>();
     _statementPrinter = Substitute.For <IPrintStatements>();
     _account          = new Account(_transactionStore, _statementPrinter);
 }
 public Account(IStoreTransactions transactionStore, IPrintStatements statementPrinter)
 {
     _transactionStore = transactionStore;
     _statementPrinter = statementPrinter;
 }
Example #7
0
 public Account(IStoreTransactions transactionStore, IPrintBankStatements statementPrinter)
 {
     this.statementPrinter = statementPrinter;
     this.transactionStore = transactionStore;
 }