@Before
public void initialise() {
transactionRepository = new TransactionRepository(clock);
+ given(clock.todayAsString()).willReturn(TODAY);
}
@Test public void
create_and_store_a_deposit_transaction() {
- given(clock.todayAsString()).willReturn(TODAY);
transactionRepository.addDeposit(100);
List<Transaction> transactions = transactionRepository.allTransactions();
@Test public void
create_and_store_a_withdrawal_transaction() {
- given(clock.todayAsString()).willReturn(TODAY);
transactionRepository.addWithdrawal(100);
List<Transaction> transactions = transactionRepository.allTransactions();