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

Public Methods
static Matcher<Object> withRowBlob(String columnName, byte[] value)
Returns a Matcher that matches a byte[] at a given column index in a Cursors data row.
static Matcher<Object> withRowBlob(int columnIndex, Matcher<byte[]> valueMatcher)
Returns a Matcher that matches a byte[] at a given column index in a Cursors data row.
static Matcher<Object> withRowBlob(int columnIndex, byte[] value)
Returns a Matcher that matches a byte[] at a given column index in a Cursors data row.
static Matcher<Object> withRowBlob(String columnName, Matcher<byte[]> valueMatcher)
Returns a Matcher that matches a byte[] at a given column index in a Cursors data row.
static Matcher<Object> 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 Matcher<Object> withRowDouble(String columnName, double value)
Returns a Matcher that matches a Double value at a given column index in a Cursors data row.
static Matcher<Object> 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 Matcher<Object> withRowDouble(int columnIndex, double value)
Returns a Matcher that matches a Double value at a given column index in a Cursors data row.
static Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> withRowFloat(int columnIndex, float value)
Returns a Matcher that matches a Float value at a given column index in a Cursors data row.
static Matcher<Object> withRowFloat(String columnName, float value)
Returns a Matcher that matches a Float value at a given column index in a Cursors data row.
static Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> withRowInt(int columnIndex, int value)
Returns a Matcher that matches a Integer value at a given column index in a Cursors data row.
static Matcher<Object> withRowInt(String columnName, int value)
Returns a Matcher that matches a Integer value at a given column index in a Cursors data row.
static Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> withRowLong(int columnIndex, long value)
Returns a Matcher that matches a Long value at a given column index in a Cursors data row.
static Matcher<Object> withRowLong(String columnName, long value)
Returns a Matcher that matches a Long value at a given column index in a Cursors data row.
static Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> withRowShort(String columnName, short value)
Returns a Matcher that matches a Short value at a given column index in a Cursors data row.
static Matcher<Object> 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 Matcher<Object> withRowShort(int columnIndex, short value)
Returns a Matcher that matches a Short value at a given column index in a Cursors data row.
static Matcher<Object> withRowString(String columnName, String value)
Returns a Matcher that matches a String value at a given column index in a Cursors data row.
static Matcher<Object> 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 Matcher<Object> withRowString(int columnIndex, String value)
Returns a Matcher that matches a String value at a given column index in a Cursors data row.
static Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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 Matcher<Object> 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