FileDocCategorySizeDatePackage
ListWithFooterViewAndNewLabelsTest.javaAPI DocAndroid 1.5 API2262Wed May 06 22:42:02 BST 2009com.android.frameworktest.focus

ListWithFooterViewAndNewLabelsTest

public class ListWithFooterViewAndNewLabelsTest extends android.test.ActivityInstrumentationTestCase

Fields Summary
private android.widget.Button
mButton
private android.widget.ListAdapter
mAdapter
private android.widget.ListView
mListView
Constructors Summary
public ListWithFooterViewAndNewLabelsTest()

        super("com.android.frameworktest",
                ListWithFooterViewAndNewLabels.class);
    
Methods Summary
public voidFAILING_testPreconditions()

        assertNotNull(mButton);
        assertNotNull(mAdapter);
        assertNotNull(mListView);

        assertTrue(mButton.hasFocus());
        assertEquals("expected list adapter to have 1 item",
                1, mAdapter.getCount());
        assertEquals("expected list view to have 2 items (1 in adapter, plus " 
                + "the footer view).",
                2, mListView.getCount());

        // fails here!!!
        assertEquals("Expecting the selected index to be 0, the first non footer "
                + "view item.",
                0, mListView.getSelectedItemPosition());
    
protected voidsetUp()

        super.setUp();

        ListWithFooterViewAndNewLabels a = getActivity();
        mButton = (Button) a.findViewById(R.id.button);
        mAdapter = a.getListAdapter();
        mListView = a.getListView();