@Test(expected = NotEnoughChipsException.class) public void if_a_player_attempts_to_place_more_chips_on_the_table_than_available_the_system_refuses_the_bet() throws Exception { when(walletService.isAvailable(p, 10)).thenReturn(false); rt.placeBet(p, Field.forNumber(10), 10); }
@Before public void setUp() { p = new Player(); rng = mock(RandomNumberGenerator.class); walletService = mock(WalletService.class); timer = new TestTimer(); rt = new RouletteTable(10000, rng, timer, walletService); when(walletService.isAvailable((Player) anyObject(), anyInt())).thenReturn(true); }