public Account(IClock clock, ITransactionRepository transactionRepository, IStatementPrinter statementPrinter) { this.clock = clock; this.transactionRepository = transactionRepository; this.statementPrinter = statementPrinter; }
public void Setup() { _transactionRepository = Substitute.For <ITransactionRepository>(); _statementPrinter = Substitute.For <IStatementPrinter>(); _clock = Substitute.For <IClock>(); _account = new Account(_transactionRepository, _statementPrinter, _clock); }
public void GivenThatAccountIsCreated() { _statementPrinter = new StatementPrinter(_console); _transactionRepository = new TransactionRepository(); _account = new Account(_clock, _transactionRepository, _statementPrinter); _account.PrintStatement(); }
public AccountServiceShould() { _transactionRepository = Substitute.For <ITransactionRepository>(); _transactionFactory = Substitute.For <ITransactionFactory>(); _statementPrinter = Substitute.For <IStatementPrinter>(); _accountService = new AccountService(_transactionRepository, _transactionFactory, _statementPrinter); }
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); }
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); }
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); }
public AccountServiceShould() { _transactionRepository = Substitute.For<ITransactionRepository>(); _transactionFactory = Substitute.For<ITransactionFactory>(); _statementPrinter = Substitute.For<IStatementPrinter>(); _accountService = new AccountService(_transactionRepository, _transactionFactory, _statementPrinter); }
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); }
public void Setup() { console = Substitute.For <IConsole>(); clock = Substitute.For <IClock>(); transactionStore = new TransactionStore(clock); statementPrinter = new StatementPrinter(console); account = new Account(transactionStore, statementPrinter); }
public AccountService( ITransactionRepository transactionRepository, ITransactionFactory transactionFactory, IStatementPrinter statementPrinter) { _transactionRepository = transactionRepository; _transactionFactory = transactionFactory; _statementPrinter = statementPrinter; }
public Account( ITransactionRepository transactionRepository, IStatementPrinter statementPrinter, IClock clock) { _Clock = clock; _TransactionRepository = transactionRepository; _StatementPrinter = statementPrinter; }
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); }
public Account(IStatementPrinter console, ICalendar calendar, ITransactionRepository accountRepository) { _calendar = calendar; _console = console; _accountRepository = accountRepository; }
public Account(ITransactionRepository transaction, IStatementPrinter @printer) { this.@printer = @printer; this.@transaction = transaction; }
public ATM(IStatementPrinter statementPrinter, ITransactionLedger transactionLedger) { _statementPrinter = statementPrinter; _transactionLedger = transactionLedger; }
public Account(ISecuritySafe securitySafe, IStatementPrinter statementPrinter) { _securitySafe = securitySafe; _statementPrinter = statementPrinter; _statementList = new StatementList(statementPrinter); }
public void Setup() { _transactionStore = Substitute.For <ITransactionStore>(); _statementPrinter = Substitute.For <IStatementPrinter>(); _account = new Account(_transactionStore, _statementPrinter); }
public AccountService(IStatementPrinter statementPrinter, ITransactionRepository transactionRepo) { _statementPrinter = statementPrinter; _transactionRepo = transactionRepo; }
public StatementPrinterTests() { consolePrinter = new Mock <IConsolePrinter>(); statementPrinter = new StatementPrinter(consolePrinter.Object); }
public Account(ITransactionStore transactionStore, IStatementPrinter statementPrinter) { this.transactionStore = transactionStore; this.statementPrinter = statementPrinter; }
public void SetUp() { outputWriter = new Mock <IOutputWriter>(); statemenPrinter = new StatementPrinter(outputWriter.Object); }
public Account(ITxHistory txHistory, IStatementPrinter statementPrinter) { _txHistory = txHistory; _statementPrinter = statementPrinter; }
public void Initialise_Test() { _outputWriter = new Mock<IOutputWriter>(); _statementPrinter = new StatementPrinter(_outputWriter.Object); }
public void Initialise_Test() { _outputWriter = new Mock <IOutputWriter>(); _statementPrinter = new StatementPrinter(_outputWriter.Object); }
public Account(ITransactionStore transactionStore, IStatementPrinter statementPrinter) { _transactionStore = transactionStore; _statementPrinter = statementPrinter; }
public Bank(ITransactionRepository transactionRepository, IStatementPrinter statementPrinter) { _transactionRepository = transactionRepository; _statementPrinter = statementPrinter; }
public Account(ITransactionRepository transaction, IStatementPrinter @printer) : this(transaction) { this.@printer = @printer; }
public AccountService(ITransactionStore store, IStatementPrinter printer) { _store = store ?? throw new ArgumentNullException(nameof(store)); _printer = printer ?? throw new ArgumentNullException(nameof(printer)); }
public Account(IAccountRepository accountRepository, IStatementPrinter statementPrinter) { _accountRepository = accountRepository; _statementPrinter = statementPrinter; }
public void initialize() { var consoleMoq = new Mock <IConsole>(); statement = new StatementPrinter(consoleMoq.Object); }
public Account(IStatementPrinter statementPrinter) { _statementPrinter = statementPrinter; _transactions = new List <Transaction>(); }
public StatementList(IStatementPrinter statementPrinter) { _statementPrinter = statementPrinter; }
public Account(IClock clock, ITransactionRepository transactionRepository, IStatementPrinter statementPrinter) { _clock = clock; _transactionRepository = transactionRepository; _statementPrinter = statementPrinter; }