@@ -0,0 +1,1890 @@
+package me.christine.housewifesolution;%0A%0Aimport android.test.ActivityInstrumentationTestCase2;%0Aimport android.test.TouchUtils;%0Aimport android.test.ViewAsserts;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0Aimport android.view.WindowManager;%0Aimport android.widget.ImageButton;%0Aimport android.widget.EditText;%0Aimport android.widget.ListView;%0A%0A/**%0A * Created by christine on 15-5-18.%0A */%0Apublic class MainActivityTest extends ActivityInstrumentationTestCase2%3CMainActivity%3E%7B%0A    private MainActivity mainActivity;%0A    private ImageButton imageButton;%0A    private EditText editText;%0A    private ListView listView;%0A%0A    public MainActivityTest() %7B%0A        super(MainActivity.class);%0A    %7D%0A%0A    protected void setUp() throws Exception %7B%0A        super.setUp();%0A%0A        setActivityInitialTouchMode(true);%0A%0A        mainActivity = getActivity();%0A        imageButton = (ImageButton) mainActivity.findViewById(R.id.add_shopping_cart);%0A        editText = (EditText) mainActivity.findViewById(R.id.add_shopping_items);%0A        listView = (ListView) mainActivity.findViewById(R.id.shopping_list);%0A    %7D%0A%0A    public void testPreconditions() %7B%0A        assertNotNull(%22MainActivity is null%22, mainActivity);%0A        assertNotNull(%22ImageButton is null%22, imageButton);%0A        assertNotNull(%22EditText is null%22, editText);%0A        assertNotNull(%22ListView is null%22, listView);%0A    %7D%0A%0A    //Verify that button is displayed correctly.%0A    public void testImageButton_layout() %7B%0A        final View decorView = mainActivity.getWindow().getDecorView();%0A        ViewAsserts.assertOnScreen(decorView, imageButton);%0A        final ViewGroup.LayoutParams layoutParams = imageButton.getLayoutParams();%0A        assertNotNull(layoutParams);%0A        assertEquals(layoutParams.width, WindowManager.LayoutParams.WRAP_CONTENT);%0A        assertEquals(layoutParams.height, WindowManager.LayoutParams.WRAP_CONTENT);%0A    %7D%0A%7D%0A

Build simple test cases to test the app and UI components.