mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-06-18 04:39:45 -04:00
[app] remove old ContentProviders from old database implementation
This commit is contained in:
committed by
Hans-Christoph Steiner
parent
a783d3cb94
commit
7a1d288792
@@ -4,8 +4,6 @@ package org.fdroid.fdroid;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
|
||||
import org.fdroid.fdroid.data.AppProvider;
|
||||
import org.fdroid.fdroid.data.Schema;
|
||||
import org.fdroid.fdroid.views.AppDetailsRecyclerViewAdapter;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -18,7 +16,6 @@ import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import androidx.loader.content.CursorLoader;
|
||||
import androidx.test.core.app.ApplicationProvider;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@@ -287,27 +284,4 @@ public class UtilsTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetAntifeatureSQLFilterWithNone() {
|
||||
Context context = ApplicationProvider.getApplicationContext();
|
||||
Preferences.setupForTests(context);
|
||||
assertEquals(
|
||||
"fdroid_app.antiFeatures IS NULL OR (fdroid_app.antiFeatures NOT LIKE '%_anti_others_%')",
|
||||
Utils.getAntifeatureSQLFilter(context)
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetAntifeatureSQLFilter() {
|
||||
CursorLoader cursorLoader = new CursorLoader(
|
||||
context,
|
||||
AppProvider.getLatestTabUri(),
|
||||
Schema.AppMetadataTable.Cols.ALL,
|
||||
Utils.getAntifeatureSQLFilter(context),
|
||||
null,
|
||||
null);
|
||||
cursor = cursorLoader.loadInBackground();
|
||||
assertNotNull(cursor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,11 +330,8 @@ public class DBHelperTest {
|
||||
assertEquals(shouldBeRepos.get(i), initialRepos.get(i));
|
||||
}
|
||||
} finally {
|
||||
for (Repo repo : RepoProvider.Helper.all(context, new String[]{Schema.RepoTable.Cols._ID})) {
|
||||
RepoProvider.Helper.remove(context, repo.getId());
|
||||
}
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
additionalReposXmlFile.delete();
|
||||
DBHelper.clearDbHelperSingleton();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user