public final class CursorMatchers
extends Object
java.lang.Object | |
↳ | android.support.test.espresso.matcher.CursorMatchers |
Hamcrest匹配器的集合,匹配 Cursor
中的数据行。
AdapterView
由Cursor
支持是非常普遍的。 此类包含Matcher
个 s表示可与使用onData(Matcher)
到一个匹配数据行Cursor
。 Matcher
只能在光标的单个数据行上运行,Espresso内部将Cursor
移动到正确的适配器位置。
Nested classes |
|
---|---|
class |
CursorMatchers.CursorMatcher |
Public methods |
|
---|---|
static CursorMatchers.CursorMatcher |
withRowBlob(int columnIndex, Matcher<byte[]> valueMatcher) 在 |
static CursorMatchers.CursorMatcher |
withRowBlob(Matcher<String> columnPicker, Matcher<byte[]> valueMatcher) 返回匹配 |
static CursorMatchers.CursorMatcher |
withRowBlob(String columnName, Matcher<byte[]> valueMatcher) 在 |
static CursorMatchers.CursorMatcher |
withRowBlob(String columnName, byte[] value) 在 |
static CursorMatchers.CursorMatcher |
withRowBlob(int columnIndex, byte[] value) 返回匹配 |
static CursorMatchers.CursorMatcher |
withRowDouble(int columnIndex, Matcher<Double> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowDouble(String columnName, double value) |
static CursorMatchers.CursorMatcher |
withRowDouble(Matcher<String> columnNameMatcher, Matcher<Double> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowDouble(int columnIndex, double value) |
static CursorMatchers.CursorMatcher |
withRowDouble(String columnName, Matcher<Double> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowFloat(String columnName, Matcher<Float> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowFloat(Matcher<String> columnNameMatcher, Matcher<Float> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowFloat(String columnName, float value) |
static CursorMatchers.CursorMatcher |
withRowFloat(int columnIndex, Matcher<Float> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowFloat(int columnIndex, float value) |
static CursorMatchers.CursorMatcher |
withRowInt(String columnName, Matcher<Integer> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowInt(String columnName, int value) |
static CursorMatchers.CursorMatcher |
withRowInt(Matcher<String> columnNameMatcher, Matcher<Integer> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowInt(int columnIndex, int value) |
static CursorMatchers.CursorMatcher |
withRowInt(int columnIndex, Matcher<Integer> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowLong(String columnName, long value) |
static CursorMatchers.CursorMatcher |
withRowLong(int columnIndex, long value) |
static CursorMatchers.CursorMatcher |
withRowLong(Matcher<String> columnNameMatcher, Matcher<Long> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowLong(String columnName, Matcher<Long> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowLong(int columnIndex, Matcher<Long> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowShort(int columnIndex, Matcher<Short> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowShort(String columnName, short value) |
static CursorMatchers.CursorMatcher |
withRowShort(Matcher<String> columnNameMatcher, Matcher<Short> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowShort(String columnName, Matcher<Short> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowShort(int columnIndex, short value) |
static CursorMatchers.CursorMatcher |
withRowString(int columnIndex, Matcher<String> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowString(String columnName, Matcher<String> valueMatcher) |
static CursorMatchers.CursorMatcher |
withRowString(String columnName, String value) |
static CursorMatchers.CursorMatcher |
withRowString(int columnIndex, String value) |
static CursorMatchers.CursorMatcher |
withRowString(Matcher<String> columnPicker, Matcher<String> valueMatcher) |
Inherited methods |
|
---|---|
From class java.lang.Object
|
CursorMatchers.CursorMatcher withRowBlob (int columnIndex, Matcher<byte[]> valueMatcher)
在 Cursor
的数据行中,返回与给定列索引处的字节[]匹配的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
valueMatcher |
Matcher : a Matcher that matches a byte[] |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowBlob (Matcher<String> columnPicker, Matcher<byte[]> valueMatcher)
在 Cursor
的数据行中返回匹配给定列索引处的字节[]的匹配器。
Parameters | |
---|---|
columnPicker |
Matcher : as a Matcher of String |
valueMatcher |
Matcher : a Matcher that matches a byte[] |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowBlob (String columnName, Matcher<byte[]> valueMatcher)
在 Cursor
的数据行中返回匹配给定列索引处的byte []的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
valueMatcher |
Matcher : a Matcher that matches a byte[] |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowBlob (String columnName, byte[] value)
在 Cursor
的数据行中返回与给定列索引处的字节[]匹配的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
value |
byte : byte[] to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowBlob (int columnIndex, byte[] value)
在 Cursor
的数据行中返回与给定列索引处的字节[]匹配的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
value |
byte : byte[] to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowDouble (int columnIndex, Matcher<Double> valueMatcher)
返回匹配 Cursor
s数据行中给定列索引处的 Double
值的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
valueMatcher |
Matcher : a Matcher that matches a Double value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowDouble (String columnName, double value)
返回匹配 Cursor
s数据行中给定列索引处的 Double
值的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
value |
double : a double value to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowDouble (Matcher<String> columnNameMatcher, Matcher<Double> valueMatcher)
返回匹配 Cursor
数据行中给定列索引处的 Double
值的匹配器。
Parameters | |
---|---|
columnNameMatcher |
Matcher : as a Matcher of String |
valueMatcher |
Matcher : a Matcher that matches a Double value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowDouble (int columnIndex, double value)
返回匹配 Cursor
数据行中给定列索引处的 Double
值的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
value |
double : a double value to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowDouble (String columnName, Matcher<Double> valueMatcher)
返回匹配 Cursor
数据行中给定列索引处的 Double
值的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
valueMatcher |
Matcher : a Matcher that matches a Double value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowFloat (String columnName, Matcher<Float> valueMatcher)
返回匹配 Cursor
的数据行中给定列索引处的 Float
值的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
valueMatcher |
Matcher : a Matcher that matches a Float value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowFloat (Matcher<String> columnNameMatcher, Matcher<Float> valueMatcher)
返回匹配 Cursor
s数据行中给定列索引处的 Float
值的匹配器。
Parameters | |
---|---|
columnNameMatcher |
Matcher : as a Matcher of String |
valueMatcher |
Matcher : a Matcher that matches a Float value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowFloat (String columnName, float value)
返回匹配 Cursor
s数据行中给定列索引处的 Float
值的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
value |
float : a float value to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowFloat (int columnIndex, Matcher<Float> valueMatcher)
返回匹配 Cursor
s数据行中给定列索引处的 Float
值的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
valueMatcher |
Matcher : a Matcher that matches a Float value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowFloat (int columnIndex, float value)
返回匹配 Cursor
的数据行中给定列索引处的 Float
值的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
value |
float : a float value to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowInt (String columnName, Matcher<Integer> valueMatcher)
返回匹配 Cursor
s数据行中给定列索引处的 Integer
值的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
valueMatcher |
Matcher : a Matcher that matches a Integer value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowInt (String columnName, int value)
返回匹配 Cursor
s数据行中给定列索引处的 Integer
值的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
value |
int : a int value to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowInt (Matcher<String> columnNameMatcher, Matcher<Integer> valueMatcher)
返回匹配 Cursor
数据行中给定列索引处的 Integer
值的匹配器。
Parameters | |
---|---|
columnNameMatcher |
Matcher : as a Matcher of String |
valueMatcher |
Matcher : a Matcher that matches a Integer value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowInt (int columnIndex, int value)
返回匹配 Cursor
数据行中给定列索引处的 Integer
值的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
value |
int : a int value to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowInt (int columnIndex, Matcher<Integer> valueMatcher)
返回与 Cursor
的数据行中给定列索引处的 Integer
值相匹配的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
valueMatcher |
Matcher : a Matcher that matches a Integer value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowLong (String columnName, long value)
返回匹配 Cursor
s数据行中给定列索引处的 Long
值的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
value |
long : a long value to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowLong (int columnIndex, long value)
返回匹配 Cursor
数据行中给定列索引处的 Long
值的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
value |
long : a long value to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowLong (Matcher<String> columnNameMatcher, Matcher<Long> valueMatcher)
返回匹配 Cursor
s数据行中给定列索引处的 Long
值的匹配器。
Parameters | |
---|---|
columnNameMatcher |
Matcher : as a Matcher of String |
valueMatcher |
Matcher : a Matcher that matches a Long value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowLong (String columnName, Matcher<Long> valueMatcher)
返回匹配 Cursor
s数据行中给定列索引处的 Long
值的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
valueMatcher |
Matcher : a Matcher that matches a Long value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowLong (int columnIndex, Matcher<Long> valueMatcher)
返回匹配 Cursor
s数据行中给定列索引处的 Long
值的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
valueMatcher |
Matcher : a Matcher that matches a Long value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowShort (int columnIndex, Matcher<Short> valueMatcher)
返回匹配 Cursor
s数据行中给定列索引处的 Short
值的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
valueMatcher |
Matcher : a Matcher that matches a Short value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowShort (String columnName, short value)
返回匹配 Cursor
s数据行中给定列索引处的 Short
值的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
value |
short : a short value to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowShort (Matcher<String> columnNameMatcher, Matcher<Short> valueMatcher)
返回匹配 Cursor
s数据行中给定列索引处的 Short
值的匹配器。
Parameters | |
---|---|
columnNameMatcher |
Matcher : as a Matcher of String |
valueMatcher |
Matcher : a Matcher that matches a Short value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowShort (String columnName, Matcher<Short> valueMatcher)
返回匹配 Cursor
s数据行中给定列索引处的 Short
值的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
valueMatcher |
Matcher : a Matcher that matches a Short value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowShort (int columnIndex, short value)
返回匹配 Cursor
数据行中给定列索引处的 Short
值的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
value |
short : a short value to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowString (int columnIndex, Matcher<String> valueMatcher)
返回匹配 Cursor
s数据行中给定列索引处的 String
值的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
valueMatcher |
Matcher : a Matcher that matches a String value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowString (String columnName, Matcher<String> valueMatcher)
返回匹配 Cursor
s数据行中给定列索引处的 String
值的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
valueMatcher |
Matcher : a Matcher that matches a String value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowString (String columnName, String value)
返回匹配 Cursor
s数据行中给定列索引处的 String
值的匹配器。
Parameters | |
---|---|
columnName |
String : as a String |
value |
String : a String value to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowString (int columnIndex, String value)
返回匹配 Cursor
的数据行中给定列索引处的 String
值的匹配器。
Parameters | |
---|---|
columnIndex |
int : int column index |
value |
String : a String value to match |
Returns | |
---|---|
CursorMatchers.CursorMatcher |
CursorMatchers.CursorMatcher withRowString (Matcher<String> columnPicker, Matcher<String> valueMatcher)
返回匹配 Cursor
s数据行中给定列索引处的 String
值的匹配器。
Parameters | |
---|---|
columnPicker |
Matcher : as a Matcher of String |
valueMatcher |
Matcher : a Matcher that matches a String value |
Returns | |
---|---|
CursorMatchers.CursorMatcher |