Esempio n. 1
0
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   instrumentation = getInstrumentation();
   ds = new DataStore();
   ds.deleteAll();
 }
Esempio n. 2
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);
  }
Esempio n. 3
0
 public void testStart_Files() {
   ds.writeNote("Note 1", "test");
   start();
   assertTrue("listView.isShown == false", listView.isShown());
   assertEquals("count:", 1, listAdapter.getCount());
 }