/cts/tests/tests/content/src/android/content/cts/ |
D | ContentResolverTest.java | 89 private Cursor mCursor; field in ContentResolverTest 125 if ( null != mCursor && !mCursor.isClosed() ) { in tearDown() 126 mCursor.close(); in tearDown() 129 if ( null != mCursor && !mCursor.isClosed() ) { in tearDown() 130 mCursor.close(); in tearDown() 313 mCursor = mContentResolver.query(TABLE1_URI, null, null, null); in testQuery() 315 assertNotNull(mCursor); in testQuery() 316 assertEquals(3, mCursor.getCount()); in testQuery() 317 assertEquals(3, mCursor.getColumnCount()); in testQuery() 319 mCursor.moveToLast(); in testQuery() [all …]
|
D | ContentQueryMapTest.java | 55 private Cursor mCursor; field in ContentQueryMapTest 75 mCursor = mResolver.query(DummyProvider.CONTENT_URI, PROJECTIONS, null, null, null); in setUp() 76 assertNotNull(mCursor); in setUp() 85 if (mCursor != null) { in tearDown() 86 mCursor.close(); in tearDown() 87 mCursor = null; in tearDown() 97 new ContentQueryMap(mCursor, DummyProvider.NAME, true, null); in testConstructor() 99 new ContentQueryMap(mCursor, DummyProvider.VALUE, false, new Handler()); in testConstructor() 102 new ContentQueryMap(mCursor, null, false, new Handler()); in testConstructor() 117 mContentQueryMap = new ContentQueryMap(mCursor, DummyProvider.NAME, true, null); in testGetRows() [all …]
|
/cts/tests/tests/database/src/android/database/cts/ |
D | AbstractWindowedCursorTest.java | 34 private MockAbstractWindowedCursor mCursor; field in AbstractWindowedCursorTest 41 mCursor = new MockAbstractWindowedCursor(); in setUp() 47 mCursor.close(); in tearDown() 53 mCursor.setWindow(mWindow); in testIsNull() 56 mCursor.moveToFirst(); in testIsNull() 57 assertTrue(mCursor.isNull(COLUMN_INDEX0)); in testIsNull() 62 assertFalse(mCursor.isNull(COLUMN_INDEX0)); in testIsNull() 66 mCursor.setWindow(mWindow); in testIsBlob() 70 mCursor.moveToFirst(); in testIsBlob() 71 assertFalse(mCursor.isBlob(COLUMN_INDEX0)); in testIsBlob() [all …]
|
D | CursorWrapperTest.java | 50 private Cursor mCursor; field in CursorWrapperTest 500 mCursor = getCursor(); in setupDatabase() 504 if (null != mCursor) { in closeDatabase() 505 mCursor.close(); in closeDatabase() 506 mCursor = null; in closeDatabase()
|
/cts/tests/app/src/android/app/cts/ |
D | AlertDialog_BuilderCursorTest.java | 64 private Cursor mCursor; field in AlertDialog_BuilderCursorTest 85 mCursor.moveToPosition(which); in onClick() 90 new String[] { mCursor.getString(1) } ); in onClick() 91 mCursor.requery(); in onClick() 147 if (mCursor != null) { in tearDown() 152 mCursor.close(); in tearDown() 153 mCursor = null; in tearDown() 168 mCursor = mDatabase.query("test", mProjectionWithoutChecked, in testSetCursor() 170 assertNotNull(mCursor); in testSetCursor() 175 mBuilder.setCursor(mCursor, mOnClickListener, TEXT_COLUMN_NAME); in testSetCursor() [all …]
|
/cts/tests/tests/provider/src/android/provider/cts/contacts/ |
D | ContactsContract_TestDataBuilder.java | 61 private Cursor mCursor; field in ContactsContract_TestDataBuilder.Builder 156 mCursor = mProvider.query(getUri(), null, null, null, null, null); in load() 157 if (mCursor == null || !mCursor.moveToFirst()) { in load() 188 mCursor = mProvider.query(getContentUri(), null, in loadUsingValues() 191 if (mCursor == null || !mCursor.moveToFirst()) { in loadUsingValues() 194 mId = mCursor.getLong(getColumnIndex(BaseColumns._ID)); in loadUsingValues() 199 return mCursor.isNull(mCursor.getColumnIndex(columnName)); in isNull() 203 return mCursor.getLong(mCursor.getColumnIndex(columnName)); in getLong() 207 return mCursor.getString(mCursor.getColumnIndex(columnName)); in getString() 211 assertEquals(value, mCursor.getLong(getColumnIndex(columnName))); in assertColumn() [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | CursorAdapterTest.java | 75 private Cursor mCursor; field in CursorAdapterTest 93 mCursor = mDatabase.query("test", NUMBER_PROJECTION, null, null, null, null, null); in setup() 94 assertNotNull(mCursor); in setup() 103 if (null != mCursor) { in teardown() 104 mCursor.close(); in teardown() 105 mCursor = null; in teardown() 114 new MockCursorAdapter(mContext, mCursor); in testConstructor() 118 new MockCursorAdapter(mContext, mCursor, true); in testConstructor() 151 cursorAdapter.init(mContext, mCursor, true); in testInit() 153 assertSame(mCursor, cursorAdapter.getCursor()); in testInit() [all …]
|
D | SimpleCursorAdapterTest.java | 108 private Cursor mCursor; field in SimpleCursorAdapterTest 114 mCursor = createTestCursor(DEFAULT_COLUMN_COUNT, ADAPTER_ROW_COUNT); in setup() 119 mContext, R.layout.cursoradapter_item0, mCursor, COLUMNS_FROM, VIEWS_TO); in makeSimpleCursorAdapter() 137 mCursor.moveToFirst(); in testBindView() 138 simpleCursorAdapter.bindView(listItem, null, mCursor); in testBindView() 141 mCursor.moveToLast(); in testBindView() 142 simpleCursorAdapter.bindView(listItem, null, mCursor); in testBindView() 150 mCursor.moveToFirst(); in testBindView() 151 simpleCursorAdapter.bindView(listItem, null, mCursor); in testBindView() 152 verify(binder, times(1)).setViewValue(any(View.class), eq(mCursor), eq(1)); in testBindView() [all …]
|
D | ResourceCursorAdapterTest.java | 56 private Cursor mCursor; field in ResourceCursorAdapterTest 64 mCursor = createTestCursor(3, 3); in setup() 75 adapter = new MockResourceCursorAdapter(mContext, R.layout.cursoradapter_item0, mCursor); in testConstructor() 78 assertSame(mCursor, adapter.getCursor()); in testConstructor() 81 R.layout.cursoradapter_item0, mCursor, false); in testConstructor() 83 assertSame(mCursor, adapter.getCursor()); in testConstructor() 90 R.layout.cursoradapter_item0, mCursor); in testSetViewResource() 107 R.layout.cursoradapter_item0, mCursor); in testSetDropDownViewResource() 133 R.layout.cursoradapter_item0, mCursor); in testNewDropDownView() 139 R.layout.cursoradapter_item1, mCursor); in testNewDropDownView() [all …]
|