ComponentNameMatchers

public final class ComponentNameMatchers


A collection of hamcrest matchers to match ComponentName objects.

Summary

Public constructors

Public methods

static Matcher<ComponentName>
hasClassName(String className)
static Matcher<ComponentName>
hasClassName(Matcher<String> classNameMatcher)
static Matcher<ComponentName>

Matches a component based on the target package name found through the Instrumentation Registry for the test.

static Matcher<ComponentName>
hasPackageName(String packageName)
static Matcher<ComponentName>
hasPackageName(Matcher<String> packageNameMatcher)
static Matcher<ComponentName>
hasShortClassName(String shortClassName)
static Matcher<ComponentName>
hasShortClassName(Matcher<String> shortClassNameMatcher)

Public constructors

ComponentNameMatchers

public ComponentNameMatchers()

Public methods

hasClassName

public static Matcher<ComponentName> hasClassName(String className)

hasClassName

public static Matcher<ComponentName> hasClassName(Matcher<String> classNameMatcher)

hasMyPackageName

public static Matcher<ComponentName> hasMyPackageName()

Matches a component based on the target package name found through the Instrumentation Registry for the test.

hasPackageName

public static Matcher<ComponentName> hasPackageName(String packageName)

hasPackageName

public static Matcher<ComponentName> hasPackageName(Matcher<String> packageNameMatcher)

hasShortClassName

public static Matcher<ComponentName> hasShortClassName(String shortClassName)

hasShortClassName

public static Matcher<ComponentName> hasShortClassName(Matcher<String> shortClassNameMatcher)