Code example for RadioButton

Methods: performClick

0
    public void testShouldConvertDramsToMillilitres() throws Exception { 
        _activity.runOnUiThread(
                new Runnable() {
                    @Override 
                    public void run() { 
                        _toMillilitresRadioButton.performClick();
                        _inputVolumeEdit.setText("8");
                        _convertVolumeButton.performClick();
                    } 
                } 
        ); 
        getInstrumentation().waitForIdleSync();
        assertThat(_convertedResults.getText().toString(), equalTo("29.6 millilitres."));
    } 
}