ComponentNameMatchers

@CheckReturnValue
public final class ComponentNameMatchers


A collection of hamcrest matchers to match ComponentName objects.

Summary

Public methods

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

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

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

Public methods

hasClassName

public static Matcher<ComponentNamehasClassName(Matcher<String> classNameMatcher)

hasClassName

public static Matcher<ComponentNamehasClassName(String className)

hasMyPackageName

public static Matcher<ComponentNamehasMyPackageName()

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

hasPackageName

public static Matcher<ComponentNamehasPackageName(Matcher<String> packageNameMatcher)

hasPackageName

public static Matcher<ComponentNamehasPackageName(String packageName)

hasShortClassName

public static Matcher<ComponentNamehasShortClassName(Matcher<String> shortClassNameMatcher)

hasShortClassName

public static Matcher<ComponentNamehasShortClassName(String shortClassName)