예제 #1
0
  public void testItemClick() throws Exception {
    ds.writeNote("Note 1", "test");
    start();
    Instrumentation.ActivityMonitor monitor =
        instrumentation.addMonitor(Editor.class.getName(), null, false);

    notes.runOnUiThread(
        new Runnable() {
          @Override
          public void run() {
            listView.performItemClick(listView, 0, 0);
          }
        });

    instrumentation.waitForIdleSync();
    Activity editor = instrumentation.waitForMonitorWithTimeout(monitor, 3 * 1000);
    notes.finishActivity(1);
    assertNotNull("Editor not started in 3 sec.", editor);
  }
예제 #2
0
 public void start() {
   notes = getActivity();
   listView = notes.getListView();
   listAdapter = listView.getAdapter();
 }