File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
hexagonal/src/test/java/com/iluwatar/hexagonal/domain Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 49
49
public class LotteryTest {
50
50
51
51
private final LotterySystem lotterySystem = new LotterySystemImpl ();
52
- private final LotteryTicketRepository repository = new LotteryTicketInMemoryRepository ();
53
52
private final WireTransfers wireTransfers = new WireTransfersImpl ();
54
53
55
54
@ Before
56
55
public void clear () {
57
- repository .deleteAll ();
56
+ // add funds to the test player's bank account
57
+ wireTransfers .setFunds ("123-12312" , 100 );
58
58
}
59
59
60
60
@ Test
61
61
public void testLottery () {
62
-
63
- // setup bank account with funds
64
- wireTransfers .setFunds ("123-12312" , 100 );
65
-
66
62
// admin resets the lottery
67
63
lotterySystem .resetLottery ();
68
64
assertEquals (lotterySystem .getAllSubmittedTickets ().size (), 0 );
You can’t perform that action at this time.
0 commit comments