@Test public void shouldSetNumberOfPlayersToTwo(){ RadioButton mockButton = Mockito.mock(RadioButton.class); when(mockButton.getId()).thenReturn(R.id.gameplay_two_player); when(mockButton.isChecked()).thenReturn(true); activity.setNumberOfPlayers(mockButton); verify(toeGame, times(2)).setNumOfPlayers(2); }
public void setNumberOfPlayers(View view){ setPlayers(R.id.gameplay_one_player == view.getId()); }
MainActivity extends RoboActivity { public void setNumberOfPlayers(View view){ setPlayers(R.id.gameplay_one_player == view.getId()); } }
MainActivity extends RoboActivity { public void setNumberOfPlayers(View view){ setPlayers(R.id.gameplay_one_player == view.getId()); }  }
MainActivity extends RoboActivity { public void setNumberOfPlayers(View view){ setPlayers(R.id.gameplay_one_player == view.getId()); }  void setNumberOfPlayers(View view); void coinToss(View view); void newGame(View view); }
MainActivity extends RoboActivity { public void setNumberOfPlayers(View view){ setPlayers(R.id.gameplay_one_player == view.getId()); }  void setNumberOfPlayers(View view); void coinToss(View view); void newGame(View view);  }