ComponentNameMatchers
public final class ComponentNameMatchers
extends Object
java.lang.Object |
↳ |
android.support.test.espresso.intent.matcher.ComponentNameMatchers |
一系列Hamcrest匹配器,匹配 ComponentName
对象。
Summary
Public methods |
static Matcher<ComponentName> |
hasClassName(Matcher<String> classNameMatcher) |
static Matcher<ComponentName> |
hasClassName(String className) |
static Matcher<ComponentName> |
hasMyPackageName() 根据通过Instrumentation Registry找到的测试目标包名匹配组件。 |
static Matcher<ComponentName> |
hasPackageName(String packageName) |
static Matcher<ComponentName> |
hasPackageName(Matcher<String> packageNameMatcher) |
static Matcher<ComponentName> |
hasShortClassName(Matcher<String> shortClassNameMatcher) |
static Matcher<ComponentName> |
hasShortClassName(String shortClassName) |
Inherited methods |
From class java.lang.Object
Object |
clone() |
boolean |
equals(Object arg0) |
void |
finalize() |
final Class<?> |
getClass() |
int |
hashCode() |
final void |
notify() |
final void |
notifyAll() |
String |
toString() |
final void |
wait(long arg0, int arg1) |
final void |
wait(long arg0) |
final void |
wait() |
|
Public methods
hasClassName
Matcher<ComponentName> hasClassName (Matcher<String> classNameMatcher)
Parameters |
classNameMatcher |
Matcher
|
Returns |
Matcher<ComponentName> |
|
hasClassName
Matcher<ComponentName> hasClassName (String className)
Parameters |
className |
String
|
Returns |
Matcher<ComponentName> |
|
hasMyPackageName
Matcher<ComponentName> hasMyPackageName ()
根据通过Instrumentation Registry找到的测试目标包名匹配组件。
Returns |
Matcher<ComponentName> |
|
hasPackageName
Matcher<ComponentName> hasPackageName (String packageName)
Parameters |
packageName |
String
|
Returns |
Matcher<ComponentName> |
|
hasPackageName
Matcher<ComponentName> hasPackageName (Matcher<String> packageNameMatcher)
Parameters |
packageNameMatcher |
Matcher
|
Returns |
Matcher<ComponentName> |
|
hasShortClassName
Matcher<ComponentName> hasShortClassName (Matcher<String> shortClassNameMatcher)
Parameters |
shortClassNameMatcher |
Matcher
|
Returns |
Matcher<ComponentName> |
|
hasShortClassName
Matcher<ComponentName> hasShortClassName (String shortClassName)
Parameters |
shortClassName |
String
|
Returns |
Matcher<ComponentName> |
|