Ejemplo n.º 1
0
        public AccountTests()
        {
            transactionStore = A.Fake <IStoreTransactions>();
            statementPrinter = A.Fake <IPrintBankStatements>();

            account = new Account(transactionStore, statementPrinter);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
 }
Ejemplo n.º 5
0
 public void Setup()
 {
     _transactionStore = Substitute.For <IStoreTransactions>();
     _statementPrinter = Substitute.For <IPrintStatements>();
     _account          = new Account(_transactionStore, _statementPrinter);
 }
Ejemplo n.º 6
0
 public Account(IStoreTransactions transactionStore, IPrintStatements statementPrinter)
 {
     _transactionStore = transactionStore;
     _statementPrinter = statementPrinter;
 }
Ejemplo n.º 7
0
 public Account(IStoreTransactions transactionStore, IPrintBankStatements statementPrinter)
 {
     this.statementPrinter = statementPrinter;
     this.transactionStore = transactionStore;
 }