@Test public void ball_rolls_for_a_random_time_between_30_and_40_seconds() throws Exception { when(rng.generate(30, 40)).thenReturn(33); rt.roll(); timer.moveTime(33001); assertFalse(rt.isBallRolling()); }
@Test public void ball_starts_rolling_when_all_players_signal_done() throws Exception { // arrange Player p2 = new Player(); Player p3 = new Player(); rt.placeBet(p, Field.forNumber(1), 10); rt.placeBet(p2, Field.forNumber(2), 10); rt.placeBet(p3, Field.forNumber(3), 10); // act rt.done(p); rt.done(p2); rt.done(p3); assertTrue(rt.isBallRolling()); }