From 8a9fd90a1272a4d5df291bcae640fc47f626448a Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Sun, 4 Dec 2016 18:35:51 +0100 Subject: [PATCH] Removing duplications from TransactionRepositoryShould --- .../test/java/org/craftedsw/feature/TransactionRepositoryShould.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/TDD/sandromancuso/bank/src/test/java/org/craftedsw/feature/TransactionRepositoryShould.java b/TDD/sandromancuso/bank/src/test/java/org/craftedsw/feature/TransactionRepositoryShould.java index 0b1e214..7b55677 100644 --- a/TDD/sandromancuso/bank/src/test/java/org/craftedsw/feature/TransactionRepositoryShould.java +++ b/TDD/sandromancuso/bank/src/test/java/org/craftedsw/feature/TransactionRepositoryShould.java @@ -27,11 +27,11 @@ public class TransactionRepositoryShould { @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 transactions = transactionRepository.allTransactions(); @@ -42,7 +42,6 @@ public class TransactionRepositoryShould { @Test public void create_and_store_a_withdrawal_transaction() { - given(clock.todayAsString()).willReturn(TODAY); transactionRepository.addWithdrawal(100); List transactions = transactionRepository.allTransactions(); -- 2.1.4