{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
public final class CursorMatchers
A collection of Hamcrest matchers that matches a data row in a Cursor.
AdapterViews that are backed by a Cursor are very common. This class contains Matcher
s that can be used together with onData to match a data row in a Cursor. The
Matchers can only operate on a single data row of the cursor and Espresso internally moves the Cursor to the correct adapter position.
Nested types |
|
|---|---|
CursorMatchers.CursorMatcher |
A |
Public constructors |
|
|---|---|
Public methods |
|
|---|---|
static CursorMatchers.CursorMatcher |
withRowBlob(int columnIndex, byte[] value)Returns a matcher that matches a byte[] at a given column index in a |
static CursorMatchers.CursorMatcher |
withRowBlob(int columnIndex, Matcher<byte[]> valueMatcher)Returns a matcher that matches a byte[] at a given column index in a |
static CursorMatchers.CursorMatcher |
withRowBlob(String columnName, byte[] value)Returns a matcher that matches a byte[] at a given column index in a |
static CursorMatchers.CursorMatcher |
withRowBlob(String columnName, Matcher<byte[]> valueMatcher)Returns a matcher that matches a byte[] at a given column index in a |
static CursorMatchers.CursorMatcher |
withRowBlob(Matcher<String> columnPicker, Matcher<byte[]> valueMatcher)Returns a matcher that matches a byte[] at a given column index in a |
static CursorMatchers.CursorMatcher |
withRowDouble(int columnIndex, double value)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowDouble(int columnIndex, Matcher<Double> valueMatcher)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowDouble(String columnName, double value)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowDouble(String columnName, Matcher<Double> valueMatcher)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowDouble(Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowFloat(int columnIndex, float value)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowFloat(int columnIndex, Matcher<Float> valueMatcher)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowFloat(String columnName, float value)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowFloat(String columnName, Matcher<Float> valueMatcher)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowFloat(Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowInt(int columnIndex, int value)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowInt(int columnIndex, Matcher<Integer> valueMatcher)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowInt(String columnName, int value)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowInt(String columnName, Matcher<Integer> valueMatcher)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowInt(Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowLong(int columnIndex, long value)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowLong(int columnIndex, Matcher<Long> valueMatcher)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowLong(String columnName, long value)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowLong(String columnName, Matcher<Long> valueMatcher)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowLong(Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowShort(int columnIndex, short value)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowShort(int columnIndex, Matcher<Short> valueMatcher)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowShort(String columnName, short value)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowShort(String columnName, Matcher<Short> valueMatcher)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowShort(Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowString(int columnIndex, String value)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowString(int columnIndex, Matcher<String> valueMatcher)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowString(String columnName, String value)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowString(String columnName, Matcher<String> valueMatcher)Returns a matcher that matches a |
static CursorMatchers.CursorMatcher |
withRowString(Returns a matcher that matches a |
public static CursorMatchers.CursorMatcher withRowBlob(int columnIndex, byte[] value)
Returns a matcher that matches a byte[] at a given column index in a Cursors data row.
| Parameters | |
|---|---|
int columnIndex |
int column index |
byte[] value |
byte[] to match |
public static CursorMatchers.CursorMatcher withRowBlob(int columnIndex, Matcher<byte[]> valueMatcher)
Returns a matcher that matches a byte[] at a given column index in a Cursors data row.
public static CursorMatchers.CursorMatcher withRowBlob(String columnName, byte[] value)
Returns a matcher that matches a byte[] at a given column index in a Cursors data row.
public static CursorMatchers.CursorMatcher withRowBlob(String columnName, Matcher<byte[]> valueMatcher)
Returns a matcher that matches a byte[] at a given column index in a Cursors data row.
public static CursorMatchers.CursorMatcher withRowBlob(Matcher<String> columnPicker, Matcher<byte[]> valueMatcher)
Returns a matcher that matches a byte[] at a given column index in a Cursors data row.
public static CursorMatchers.CursorMatcher withRowDouble(int columnIndex, double value)
Returns a matcher that matches a Double value at a given column index in a s data row.
| Parameters | |
|---|---|
int columnIndex |
int column index |
double value |
a double value to match |
public static CursorMatchers.CursorMatcher withRowDouble(int columnIndex, Matcher<Double> valueMatcher)
Returns a matcher that matches a Double value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowDouble(String columnName, double value)
Returns a matcher that matches a Double value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowDouble(String columnName, Matcher<Double> valueMatcher)
Returns a matcher that matches a Double value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowDouble(
Matcher<String> columnNameMatcher,
Matcher<Double> valueMatcher
)
Returns a matcher that matches a Double value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowFloat(int columnIndex, float value)
Returns a matcher that matches a Float value at a given column index in a s data row.
| Parameters | |
|---|---|
int columnIndex |
int column index |
float value |
a float value to match |
public static CursorMatchers.CursorMatcher withRowFloat(int columnIndex, Matcher<Float> valueMatcher)
Returns a matcher that matches a Float value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowFloat(String columnName, float value)
Returns a matcher that matches a Float value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowFloat(String columnName, Matcher<Float> valueMatcher)
Returns a matcher that matches a Float value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowFloat(
Matcher<String> columnNameMatcher,
Matcher<Float> valueMatcher
)
Returns a matcher that matches a Float value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowInt(int columnIndex, int value)
Returns a matcher that matches a Integer value at a given column index in a s data row.
| Parameters | |
|---|---|
int columnIndex |
int column index |
int value |
a int value to match |
public static CursorMatchers.CursorMatcher withRowInt(int columnIndex, Matcher<Integer> valueMatcher)
Returns a matcher that matches a Integer value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowInt(String columnName, int value)
Returns a matcher that matches a Integer value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowInt(String columnName, Matcher<Integer> valueMatcher)
Returns a matcher that matches a Integer value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowInt(
Matcher<String> columnNameMatcher,
Matcher<Integer> valueMatcher
)
Returns a matcher that matches a Integer value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowLong(int columnIndex, long value)
Returns a matcher that matches a Long value at a given column index in a s data row.
| Parameters | |
|---|---|
int columnIndex |
int column index |
long value |
a long value to match |
public static CursorMatchers.CursorMatcher withRowLong(int columnIndex, Matcher<Long> valueMatcher)
Returns a matcher that matches a Long value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowLong(String columnName, long value)
Returns a matcher that matches a Long value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowLong(String columnName, Matcher<Long> valueMatcher)
Returns a matcher that matches a Long value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowLong(
Matcher<String> columnNameMatcher,
Matcher<Long> valueMatcher
)
Returns a matcher that matches a Long value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowShort(int columnIndex, short value)
Returns a matcher that matches a Short value at a given column index in a s data row.
| Parameters | |
|---|---|
int columnIndex |
int column index |
short value |
a short value to match |
public static CursorMatchers.CursorMatcher withRowShort(int columnIndex, Matcher<Short> valueMatcher)
Returns a matcher that matches a Short value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowShort(String columnName, short value)
Returns a matcher that matches a Short value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowShort(String columnName, Matcher<Short> valueMatcher)
Returns a matcher that matches a Short value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowShort(
Matcher<String> columnNameMatcher,
Matcher<Short> valueMatcher
)
Returns a matcher that matches a Short value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowString(int columnIndex, String value)
Returns a matcher that matches a String value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowString(int columnIndex, Matcher<String> valueMatcher)
Returns a matcher that matches a String value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowString(String columnName, String value)
Returns a matcher that matches a String value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowString(String columnName, Matcher<String> valueMatcher)
Returns a matcher that matches a String value at a given column index in a s data row.
public static CursorMatchers.CursorMatcher withRowString(
Matcher<String> columnPicker,
Matcher<String> valueMatcher
)
Returns a matcher that matches a String value at a given column index in a s data row.