public final class

CursorMatchers

extends Object
java.lang.Object
   ↳ android.support.test.espresso.matcher.CursorMatchers

Class Overview

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 Matchers that can be used together with onData(Matcher) 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.

Summary

Nested Classes
class CursorMatchers.CursorMatcher A Matcher that matches Cursors based on values in their columns. 
Public Methods
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.
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.
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.
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.
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.
static CursorMatchers.CursorMatcher withRowDouble(String columnName, double value)
Returns a matcher that matches a Double value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowDouble(String columnName, Matcher<Double> valueMatcher)
Returns a matcher that matches a Double value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowDouble(int columnIndex, double value)
Returns a matcher that matches a Double value at a given column index in a Cursors data row.
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 Cursors data row.
static CursorMatchers.CursorMatcher withRowDouble(int columnIndex, Matcher<Double> valueMatcher)
Returns a matcher that matches a Double value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowFloat(String columnName, Matcher<Float> valueMatcher)
Returns a matcher that matches a Float value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowFloat(int columnIndex, float value)
Returns a matcher that matches a Float value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowFloat(String columnName, float value)
Returns a matcher that matches a Float value at a given column index in a Cursors data row.
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 Cursors data row.
static CursorMatchers.CursorMatcher withRowFloat(int columnIndex, Matcher<Float> valueMatcher)
Returns a matcher that matches a Float value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowInt(String columnName, Matcher<Integer> valueMatcher)
Returns a matcher that matches a Integer value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowInt(int columnIndex, int value)
Returns a matcher that matches a Integer value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowInt(String columnName, int value)
Returns a matcher that matches a Integer value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowInt(int columnIndex, Matcher<Integer> valueMatcher)
Returns a matcher that matches a Integer value at a given column index in a Cursors data row.
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 Cursors data row.
static CursorMatchers.CursorMatcher withRowLong(int columnIndex, Matcher<Long> valueMatcher)
Returns a matcher that matches a Long value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowLong(int columnIndex, long value)
Returns a matcher that matches a Long value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowLong(String columnName, long value)
Returns a matcher that matches a Long value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowLong(String columnName, Matcher<Long> valueMatcher)
Returns a matcher that matches a Long value at a given column index in a Cursors data row.
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 Cursors data row.
static CursorMatchers.CursorMatcher withRowShort(int columnIndex, Matcher<Short> valueMatcher)
Returns a matcher that matches a Short value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowShort(String columnName, Matcher<Short> valueMatcher)
Returns a matcher that matches a Short value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowShort(String columnName, short value)
Returns a matcher that matches a Short value at a given column index in a Cursors data row.
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 Cursors data row.
static CursorMatchers.CursorMatcher withRowShort(int columnIndex, short value)
Returns a matcher that matches a Short value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowString(String columnName, String value)
Returns a matcher that matches a String value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowString(int columnIndex, Matcher<String> valueMatcher)
Returns a matcher that matches a String value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowString(int columnIndex, String value)
Returns a matcher that matches a String value at a given column index in a Cursors data row.
static CursorMatchers.CursorMatcher withRowString(String columnName, Matcher<String> valueMatcher)
Returns a matcher that matches a String value at a given column index in a Cursors data row.
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 Cursors data row.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

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.

Parameters
columnName as a String
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.

Parameters
columnIndex int column index
valueMatcher a Matcher that matches a byte[]

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
columnIndex int column index
value byte[] to match

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.

Parameters
columnName as a String
valueMatcher a Matcher that matches a byte[]

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.

Parameters
columnPicker as a Matcher of String
valueMatcher a Matcher that matches a byte[]

public static CursorMatchers.CursorMatcher withRowDouble (String columnName, double value)

Returns a matcher that matches a Double value at a given column index in a Cursors data row.

Parameters
columnName as a String
value a double value to match

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 Cursors data row.

Parameters
columnName as a String
valueMatcher a Matcher that matches a Double value

public static CursorMatchers.CursorMatcher withRowDouble (int columnIndex, double value)

Returns a matcher that matches a Double value at a given column index in a Cursors data row.

Parameters
columnIndex int column index
value a double value to match

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 Cursors data row.

Parameters
columnNameMatcher as a Matcher of String
valueMatcher a Matcher that matches a Double value

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 Cursors data row.

Parameters
columnIndex int column index
valueMatcher a Matcher that matches a Double value

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 Cursors data row.

Parameters
columnName as a String
valueMatcher a Matcher that matches a Float value

public static CursorMatchers.CursorMatcher withRowFloat (int columnIndex, float value)

Returns a matcher that matches a Float value at a given column index in a Cursors data row.

Parameters
columnIndex int column index
value a float value to match

public static CursorMatchers.CursorMatcher withRowFloat (String columnName, float value)

Returns a matcher that matches a Float value at a given column index in a Cursors data row.

Parameters
columnName as a String
value a float value to match

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 Cursors data row.

Parameters
columnNameMatcher as a Matcher of String
valueMatcher a Matcher that matches a Float value

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 Cursors data row.

Parameters
columnIndex int column index
valueMatcher a Matcher that matches a Float value

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 Cursors data row.

Parameters
columnName as a String
valueMatcher a Matcher that matches a Integer value

public static CursorMatchers.CursorMatcher withRowInt (int columnIndex, int value)

Returns a matcher that matches a Integer value at a given column index in a Cursors data row.

Parameters
columnIndex int column index
value a int value to match

public static CursorMatchers.CursorMatcher withRowInt (String columnName, int value)

Returns a matcher that matches a Integer value at a given column index in a Cursors data row.

Parameters
columnName as a String
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 Cursors data row.

Parameters
columnIndex int column index
valueMatcher a Matcher that matches a Integer value

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 Cursors data row.

Parameters
columnNameMatcher as a Matcher of String
valueMatcher a Matcher that matches a Integer value

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 Cursors data row.

Parameters
columnIndex int column index
valueMatcher a Matcher that matches a Long value

public static CursorMatchers.CursorMatcher withRowLong (int columnIndex, long value)

Returns a matcher that matches a Long value at a given column index in a Cursors data row.

Parameters
columnIndex int column index
value a long value to match

public static CursorMatchers.CursorMatcher withRowLong (String columnName, long value)

Returns a matcher that matches a Long value at a given column index in a Cursors data row.

Parameters
columnName as a String
value a long value to match

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 Cursors data row.

Parameters
columnName as a String
valueMatcher a Matcher that matches a Long value

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 Cursors data row.

Parameters
columnNameMatcher as a Matcher of String
valueMatcher a Matcher that matches a Long value

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 Cursors data row.

Parameters
columnIndex int column index
valueMatcher a Matcher that matches a Short value

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 Cursors data row.

Parameters
columnName as a String
valueMatcher a Matcher that matches a Short value

public static CursorMatchers.CursorMatcher withRowShort (String columnName, short value)

Returns a matcher that matches a Short value at a given column index in a Cursors data row.

Parameters
columnName as a String
value a short value to match

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 Cursors data row.

Parameters
columnNameMatcher as a Matcher of String
valueMatcher a Matcher that matches a Short value

public static CursorMatchers.CursorMatcher withRowShort (int columnIndex, short value)

Returns a matcher that matches a Short value at a given column index in a Cursors data row.

Parameters
columnIndex int column index
value a short value to match

public static CursorMatchers.CursorMatcher withRowString (String columnName, String value)

Returns a matcher that matches a String value at a given column index in a Cursors data row.

Parameters
columnName as a String
value a String value to match

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 Cursors data row.

Parameters
columnIndex int column index
valueMatcher a Matcher that matches a String value

public static CursorMatchers.CursorMatcher withRowString (int columnIndex, String value)

Returns a matcher that matches a String value at a given column index in a Cursors data row.

Parameters
columnIndex int column index
value a String value to match

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 Cursors data row.

Parameters
columnName as a String
valueMatcher a Matcher that matches a String value

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 Cursors data row.

Parameters
columnPicker as a Matcher of String
valueMatcher a Matcher that matches a String value