ListWithOnItemSelectedActionTestpublic class ListWithOnItemSelectedActionTest extends android.test.ActivityInstrumentationTestCase
Fields Summary |
---|
private android.widget.ListView | mListView |
Constructors Summary |
---|
public ListWithOnItemSelectedActionTest()
super("com.android.frameworktest", ListWithOnItemSelectedAction.class);
|
Methods Summary |
---|
private java.lang.String | getValueOfSelectedTextView()
return ((TextView) mListView.getSelectedView()).getText().toString();
| protected void | setUp()
super.setUp();
mListView = getActivity().getListView();
| public void | testHeaderEchoesSelectionAfterMove()
sendKeys(KeyEvent.KEYCODE_DPAD_DOWN);
assertEquals(1, mListView.getSelectedItemPosition());
assertEquals("header text field should be echoing contents of selected item",
getValueOfSelectedTextView(),
getActivity().getHeaderValue());
| public void | testPreconditions()
assertEquals(0, mListView.getSelectedItemPosition());
assertEquals("header text field should be echoing contents of selected item",
getValueOfSelectedTextView(),
getActivity().getHeaderValue());
|
|