@@ -0,0 +1,2440 @@
+package ca.ualberta.CMPUT301W15T06.test;%0A%0Aimport android.app.Activity;%0Aimport android.app.Instrumentation;%0Aimport android.app.Instrumentation.ActivityMonitor;%0Aimport android.test.ActivityInstrumentationTestCase2;%0Aimport android.test.ViewAsserts;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0Aimport android.view.WindowManager;%0Aimport android.widget.Button;%0Aimport android.widget.EditText;%0Aimport android.widget.ListView;%0Aimport android.widget.TextView;%0Aimport ca.ualberta.CMPUT301W15T06.AppSingleton;%0Aimport ca.ualberta.CMPUT301W15T06.ClaimantAddClaimActivity;%0Aimport ca.ualberta.CMPUT301W15T06.ClaimantClaimListActivity;%0Aimport ca.ualberta.CMPUT301W15T06.MainActivity;%0A%0Apublic class US09_01_01_Test extends ActivityInstrumentationTestCase2%3CMainActivity%3E%7B%0A%0A%09public US09_01_01_Test() %7B%0A%09%09super(MainActivity.class);%0A%09%7D%0A%09%0A%09Button ClaimantButton;%0A%09Instrumentation instrumentation;%0A%09Activity activity;%0A%09EditText textInput;%0A%09ListView gv;%0A%09%0A%09protected void setUp() throws Exception %7B%0A%09%09%0A%09%09super.setUp();%0A%09%09instrumentation = getInstrumentation();%0A%09%09activity = getActivity();%0A%09%09ClaimantButton = (Button) activity.findViewById(ca.ualberta.CMPUT301W15T06.R.id.claimantButton);%0A%09%09setActivityInitialTouchMode(false);%0A%0A%09%7D%0A%09%0A%09public void testClaimListActivity() %7B%0A%0A%09%09// monitor%0A%09%09ActivityMonitor activityMonitor = getInstrumentation().addMonitor(ClaimantClaimListActivity.class.getName(), null, false);%0A%09%09%0A%09%09// open current activity.%0A%09%09activity.runOnUiThread(new Runnable() %7B%0A%09%09%09@Override%0A%09%09%09public void run() %7B%0A%09%09%09  // click button and open next activity.%0A%09%09%09  ClaimantButton.performClick();%0A%09%09  %7D%0A%09%09%7D);%0A%09%09%0A%09%09// next activity is opened and captured.%0A%09%09ClaimantClaimListActivity nextActivity = (ClaimantClaimListActivity) getInstrumentation().waitForMonitorWithTimeout(activityMonitor, 10000);%0A%0A%09%09// add monitor%0A%09%09ActivityMonitor am = getInstrumentation().addMonitor(ClaimantAddClaimActivity.class.getName(), null, false);%0A%09%09%0A%09%09// monitor should not be null%0A%09%09assertNotNull(%22Monitor should not be null%22, am);%0A %0A%09%09// Click the menu option%0A%09%09//getInstrumentation().sendKeyDownUpSync(KeyEvent.KEYCODE_MENU);%0A%09%09boolean res = getInstrumentation().invokeMenuActionSync(nextActivity,ca.ualberta.CMPUT301W15T06.R.id.add_new_claim, 1);%0A%09%09%0A%09%09// check if item is abled%0A%09%09assertTrue(%22invokeMenuActionSync should return true%22, res);%0A%0A%09%09boolean internet = AppSingleton.getInstance().isSuc();%0A%09%09assertNotNull(%22internet should not be null%22, internet);%0A%09%09%0A%09%7D%0A%7D%0A

add test for US09