Ejemplo n.º 1
0
 public Account(IClock clock, ITransactionRepository transactionRepository,
                IStatementPrinter statementPrinter)
 {
     this.clock = clock;
     this.transactionRepository = transactionRepository;
     this.statementPrinter      = statementPrinter;
 }
Ejemplo n.º 2
0
 public void Setup()
 {
     _transactionRepository = Substitute.For <ITransactionRepository>();
     _statementPrinter      = Substitute.For <IStatementPrinter>();
     _clock   = Substitute.For <IClock>();
     _account = new Account(_transactionRepository, _statementPrinter, _clock);
 }
Ejemplo n.º 3
0
 public void GivenThatAccountIsCreated()
 {
     _statementPrinter = new StatementPrinter(_console);
     _transactionRepository = new TransactionRepository();
     _account = new Account(_clock, _transactionRepository, _statementPrinter);
     _account.PrintStatement();
 }
Ejemplo n.º 4
0
        public AccountServiceShould()
        {
            _transactionRepository = Substitute.For <ITransactionRepository>();
            _transactionFactory    = Substitute.For <ITransactionFactory>();
            _statementPrinter      = Substitute.For <IStatementPrinter>();

            _accountService = new AccountService(_transactionRepository, _transactionFactory, _statementPrinter);
        }
Ejemplo n.º 5
0
 public void SetUp()
 {
     outputWriter          = new Mock <IOutputWriter>();
     clock                 = new Mock <IClock>();
     transactionRepository = new TransactionRepository(clock.Object);
     statementPrinter      = new StatementPrinter(outputWriter.Object);
     account               = new Account(transactionRepository, statementPrinter);
 }
Ejemplo n.º 6
0
 public void GivenThatAccountIsCreated()
 {
     _Clock = new Mock<IClock>();
     _Console = new Mock<IBankConsole>();
     _TransactionRepository = new TransactionRepository();
     _StatementPrinter = new StatementPrinter(_Console.Object);
     _Account = new Account(_TransactionRepository, _StatementPrinter, _Clock.Object);
 }
Ejemplo n.º 7
0
 public void GivenThatAccountIsCreated()
 {
     _Clock   = new Mock <IClock>();
     _Console = new Mock <IBankConsole>();
     _TransactionRepository = new TransactionRepository();
     _StatementPrinter      = new StatementPrinter(_Console.Object);
     _Account = new Account(_TransactionRepository, _StatementPrinter, _Clock.Object);
 }
Ejemplo n.º 8
0
        public AccountServiceShould()
        {
            _transactionRepository = Substitute.For<ITransactionRepository>();
            _transactionFactory = Substitute.For<ITransactionFactory>();
            _statementPrinter = Substitute.For<IStatementPrinter>();

            _accountService = new AccountService(_transactionRepository, _transactionFactory, _statementPrinter);
        }
Ejemplo n.º 9
0
        public PrintStatementFeature()
        {
            _consoleMock = new Mock <IConsoleWriter>();
            _clockMock   = new Mock <IClock>();

            _statementPrinter      = new StatementPrinter(_consoleMock.Object);
            _transactionRepository = new TransactionRepository(_clockMock.Object);
            account = new Account(_transactionRepository, _statementPrinter);
        }
Ejemplo n.º 10
0
        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.º 11
0
 public AccountService(
     ITransactionRepository transactionRepository,
     ITransactionFactory transactionFactory,
     IStatementPrinter statementPrinter)
 {
     _transactionRepository = transactionRepository;
     _transactionFactory = transactionFactory;
     _statementPrinter = statementPrinter;
 }
Ejemplo n.º 12
0
 public Account(
     ITransactionRepository transactionRepository, 
     IStatementPrinter statementPrinter, 
     IClock clock)
 {
     _Clock = clock;
     _TransactionRepository = transactionRepository;
     _StatementPrinter = statementPrinter;
 }
Ejemplo n.º 13
0
 public Account(
     ITransactionRepository transactionRepository,
     IStatementPrinter statementPrinter,
     IClock clock)
 {
     _Clock = clock;
     _TransactionRepository = transactionRepository;
     _StatementPrinter      = statementPrinter;
 }
Ejemplo n.º 14
0
 public AccountService(
     ITransactionRepository transactionRepository,
     ITransactionFactory transactionFactory,
     IStatementPrinter statementPrinter)
 {
     _transactionRepository = transactionRepository;
     _transactionFactory    = transactionFactory;
     _statementPrinter      = statementPrinter;
 }
Ejemplo n.º 15
0
        public AccountService(
            ITransactionRepository repository,
            IDateTimeProvider dateTimeProvider,
            IStatementPrinter statementPrinter)
        {
            if (repository == null)
            {
                throw new InvalidRepositoryException("Account");
            }

            if (dateTimeProvider == null)
            {
                throw new InvalidProviderException("DateTime");
            }

            _repository       = repository;
            _dateTimeProvider = dateTimeProvider;
            _statementPrinter = statementPrinter;
        }
 public void Init()
 {
     _statementPrinter = new StatementPrinter(_console);
 }
Ejemplo n.º 17
0
 public Account(IStatementPrinter console, ICalendar calendar, ITransactionRepository accountRepository)
 {
     _calendar          = calendar;
     _console           = console;
     _accountRepository = accountRepository;
 }
Ejemplo n.º 18
0
 public Account(ITransactionRepository transaction, IStatementPrinter @printer)
 {
     this.@printer     = @printer;
     this.@transaction = transaction;
 }
Ejemplo n.º 19
0
 public ATM(IStatementPrinter statementPrinter, ITransactionLedger transactionLedger)
 {
     _statementPrinter  = statementPrinter;
     _transactionLedger = transactionLedger;
 }
 public Account(ISecuritySafe securitySafe, IStatementPrinter statementPrinter)
 {
     _securitySafe     = securitySafe;
     _statementPrinter = statementPrinter;
     _statementList    = new StatementList(statementPrinter);
 }
Ejemplo n.º 21
0
 public void Setup()
 {
     _transactionStore = Substitute.For <ITransactionStore>();
     _statementPrinter = Substitute.For <IStatementPrinter>();
     _account          = new Account(_transactionStore, _statementPrinter);
 }
Ejemplo n.º 22
0
 public AccountService(IStatementPrinter statementPrinter, ITransactionRepository transactionRepo)
 {
     _statementPrinter = statementPrinter;
     _transactionRepo  = transactionRepo;
 }
Ejemplo n.º 23
0
 public StatementPrinterTests()
 {
     consolePrinter   = new Mock <IConsolePrinter>();
     statementPrinter = new StatementPrinter(consolePrinter.Object);
 }
Ejemplo n.º 24
0
 public Account(ITransactionStore transactionStore, IStatementPrinter statementPrinter)
 {
     this.transactionStore = transactionStore;
     this.statementPrinter = statementPrinter;
 }
Ejemplo n.º 25
0
 public void SetUp()
 {
     outputWriter    = new Mock <IOutputWriter>();
     statemenPrinter = new StatementPrinter(outputWriter.Object);
 }
Ejemplo n.º 26
0
 public Account(ITxHistory txHistory, IStatementPrinter statementPrinter)
 {
     _txHistory        = txHistory;
     _statementPrinter = statementPrinter;
 }
Ejemplo n.º 27
0
        public void Initialise_Test()
        {
            _outputWriter = new Mock<IOutputWriter>();

            _statementPrinter = new StatementPrinter(_outputWriter.Object);
        }
Ejemplo n.º 28
0
        public void Initialise_Test()
        {
            _outputWriter = new Mock <IOutputWriter>();

            _statementPrinter = new StatementPrinter(_outputWriter.Object);
        }
Ejemplo n.º 29
0
 public Account(ITransactionStore transactionStore, IStatementPrinter statementPrinter)
 {
     _transactionStore = transactionStore;
     _statementPrinter = statementPrinter;
 }
Ejemplo n.º 30
0
 public Bank(ITransactionRepository transactionRepository, IStatementPrinter statementPrinter)
 {
     _transactionRepository = transactionRepository;
     _statementPrinter      = statementPrinter;
 }
Ejemplo n.º 31
0
 public Account(ITransactionRepository transaction, IStatementPrinter @printer) : this(transaction)
 {
     this.@printer = @printer;
 }
Ejemplo n.º 32
0
 public AccountService(ITransactionStore store, IStatementPrinter printer)
 {
     _store   = store ?? throw new ArgumentNullException(nameof(store));
     _printer = printer ?? throw new ArgumentNullException(nameof(printer));
 }
Ejemplo n.º 33
0
 public Account(IAccountRepository accountRepository, IStatementPrinter statementPrinter)
 {
     _accountRepository = accountRepository;
     _statementPrinter  = statementPrinter;
 }
Ejemplo n.º 34
0
        public void initialize()
        {
            var consoleMoq = new Mock <IConsole>();

            statement = new StatementPrinter(consoleMoq.Object);
        }
Ejemplo n.º 35
0
 public Account(IStatementPrinter statementPrinter)
 {
     _statementPrinter = statementPrinter;
     _transactions     = new List <Transaction>();
 }
 public StatementList(IStatementPrinter statementPrinter)
 {
     _statementPrinter = statementPrinter;
 }
Ejemplo n.º 37
0
 public Account(IClock clock, ITransactionRepository transactionRepository, IStatementPrinter statementPrinter)
 {
     _clock = clock;
     _transactionRepository = transactionRepository;
     _statementPrinter = statementPrinter;
 }