Lines Matching refs:cursor
21 private SimpleTestCursor cursor;
29 cursor = new SimpleTestCursor();
30 shadowContentResolver.setCursor(uri, cursor);
34 cursor.setColumnNames(columnNames);
40 assertThat(cursor.uri, equalTo(uri));
41 assertThat(cursor.projection[0], equalTo("projection"));
42 assertThat(cursor.selection, equalTo("selection"));
43 assertThat(cursor.selectionArgs[0], equalTo("selection"));
44 assertThat(cursor.sortOrder, equalTo("sortOrder"));
49 cursor.setResults(new Object[][]{new Object[]{"aString", 1234L}});
50 assertThat(cursor.moveToNext(), equalTo(true));
51 assertThat(cursor.getString(cursor.getColumnIndex("stringColumn")), equalTo("aString"));
52 assertThat(cursor.getLong(cursor.getColumnIndex("longColumn")), equalTo(1234L));
57 cursor.setResults(new Object[][] { new Object[] { "aString", 1234L }, new Object[] { "anotherString", 5678L }});
58 assertThat(cursor.moveToNext(), equalTo(true));
59 assertThat(cursor.moveToNext(), equalTo(true));
60 assertThat(cursor.getString(cursor.getColumnIndex("stringColumn")), equalTo("anotherString"));
61 assertThat(cursor.getLong(cursor.getColumnIndex("longColumn")), equalTo(5678L));
66 cursor.close();
67 assertThat(cursor.getCloseWasCalled(), equalTo(true));