@Override
  protected void setUp() throws Exception {
    super.setUp();

    // test provider is clean
    String[] catalogsProjection = {CatalogProviderContract.Tables.CatalogItems._ID};
    Cursor cursor =
        getMockContentResolver()
            .query(CatalogProviderContract.CATALOGS_URI, catalogsProjection, null, null, null);
    try {
      assertEquals(0, cursor.getCount());
    } finally {
      cursor.close();
    }
    String[] itemsProjection = {CatalogProviderContract.Tables.Items._ID};
    cursor =
        getMockContentResolver()
            .query(CatalogProviderContract.ITEMS_URI, itemsProjection, null, null, null);
    try {
      assertEquals(0, cursor.getCount());
    } finally {
      cursor.close();
    }
  }
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   setContext(getMockContext());
   provider = getProvider();
 }
 public void setUp() throws Exception {
   super.setUp();
   mTalksHandler = new TalksJsonHandler();
 }
示例#4
0
 @Override
 protected void setUp() throws Exception {
   super.setUp();
 }