Code example for RadioButton

Methods: performClick

0
		assertEquals("14th joke is 'This is new joke #11'", "This is new joke #11", m_arrFilteredJokeList.get(13).getJoke());
		final RadioButton m_vwLikeButton14 = (RadioButton)jv14.findViewById(R.id.likeButton);
		assertFalse("Check Like Unchecked", m_vwLikeButton14.isChecked());
		getActivity().runOnUiThread(new Runnable() {
		public void run() { 
			m_vwLikeButton14.performClick();
		} 
		}); 
		getInstrumentation().waitForIdleSync();
		assertTrue("Check Like Checked", m_vwLikeButton14.isChecked());
		 
		//Check Unrated on third jokeView still 
		JokeView jv3 = (JokeView)m_jokeAdapter.getView(2, null, null);
		RadioGroup m_vwLikeGroup3 = (RadioGroup)jv3.findViewById(R.id.ratingRadioGroup);
		assertEquals("Check Unrated", m_vwLikeGroup3.getCheckedRadioButtonId(), -1);
		 
		//Filter jokes by dislike 
		Menu menu = null;
		menu = this.retrieveHiddenMember("m_vwMenu", menu, getActivity());
		MenuItem filter = menu.getItem(0);
		SubMenu sm = filter.getSubMenu();