mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-26 20:55:10 +00:00
Reimplement contact search collection to support group access predicate.
This commit is contained in:
committed by
Cody Henthorne
parent
9dd96148d1
commit
1cea615675
@@ -28,4 +28,12 @@ abstract class MockCursor : Cursor {
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
override fun isLast(): Boolean {
|
||||
return _position == count - 1
|
||||
}
|
||||
|
||||
override fun isAfterLast(): Boolean {
|
||||
return _position >= count
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class ContactSearchPagedDataSourceTest {
|
||||
|
||||
@Before
|
||||
fun setUp() {
|
||||
whenever(repository.getRecipientFromGroupCursor(cursor)).thenReturn(Recipient.UNKNOWN)
|
||||
whenever(repository.getRecipientFromGroupRecord(any())).thenReturn(Recipient.UNKNOWN)
|
||||
whenever(repository.getRecipientFromRecipientCursor(cursor)).thenReturn(Recipient.UNKNOWN)
|
||||
whenever(repository.getRecipientFromThreadCursor(cursor)).thenReturn(Recipient.UNKNOWN)
|
||||
whenever(repository.getRecipientFromDistributionListCursor(cursor)).thenReturn(Recipient.UNKNOWN)
|
||||
@@ -34,6 +34,8 @@ class ContactSearchPagedDataSourceTest {
|
||||
whenever(cursor.moveToPosition(any())).thenCallRealMethod()
|
||||
whenever(cursor.moveToNext()).thenCallRealMethod()
|
||||
whenever(cursor.position).thenCallRealMethod()
|
||||
whenever(cursor.isLast).thenCallRealMethod()
|
||||
whenever(cursor.isAfterLast).thenCallRealMethod()
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user