android.test.mock.MockCursor

Here are the examples of the java api class android.test.mock.MockCursor taken from open source projects.

1. VenmoMockContext#mockCursor()

Project: braintree_android
File: VenmoMockContext.java
private MockCursor mockCursor(String whitelistValue) {
    final MockCursor mockCursor = mock(MockCursor.class);
    when(mockCursor.getCount()).thenReturn(1);
    when(mockCursor.getString(anyInt())).thenReturn(whitelistValue);
    when(mockCursor.moveToFirst()).thenReturn(true);
    return mockCursor;
}