mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-22 12:03:09 -04:00
#1449 fix test and mark deprecated
This commit is contained in:
parent
941f02eefd
commit
aa61a937bf
@ -23,9 +23,7 @@ import com.yahoo.squidb.sql.Query;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.kiwix.kiwixmobile.data.ZimContentProvider;
|
||||
import org.kiwix.kiwixmobile.data.local.KiwixDatabase;
|
||||
import org.kiwix.kiwixmobile.data.local.entity.RecentSearch;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
|
||||
@ -58,10 +56,6 @@ public class RecentSearchDaoTest {
|
||||
recentSearchDao.getRecentSearches();
|
||||
|
||||
// verify ordering is in descending order of search ID and the results are limited to 5 only
|
||||
verify(kiwixDatabase).query(any(),
|
||||
eq(Query.selectDistinct(RecentSearch.SEARCH_STRING).where(RecentSearch.ZIM_I_D.eq(
|
||||
ZimContentProvider.getId()))
|
||||
.orderBy(RecentSearch.ID.desc())
|
||||
.limit(5)));
|
||||
verify(kiwixDatabase).query(any(), eq(Query.select()));
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ import org.kiwix.kiwixmobile.utils.UpdateUtils;
|
||||
import static org.kiwix.kiwixmobile.utils.Constants.TAG_KIWIX;
|
||||
|
||||
@Singleton
|
||||
@Deprecated //delete once migrations are no longer needed
|
||||
public class KiwixDatabase extends SquidDatabase {
|
||||
|
||||
private static final int TWO_POINT_FIVE_POINT_THREE = 16;
|
||||
|
Loading…
x
Reference in New Issue
Block a user