IntentSubject


public final class IntentSubject extends Subject


Subject for making assertions about Intents.

Summary

Public methods

static IntentSubject
final IterableSubject
final BundleSubject
final void
final void
hasAction(String action)
final void
final void
hasComponent(String packageName, String className)
final void
final void
hasComponentClass(Class<Object> componentClass)
final void
final void
hasData(Uri uri)
final void
hasFlags(int flag)

Assert that the intent has the given flag set.

final void
final void
hasPackage(String packageName)
final void
static Subject.Factory<IntentSubjectIntent>

Inherited methods

From com.google.common.truth.Subject
String
final boolean

This method is deprecated.

final void
final void
failWithoutActual(Fact first, Fact[] rest)
final int

This method is deprecated.

final StandardSubjectBuilder
void
isAnyOf(Object first, Object second, @Nullable Object[] rest)
void
isEqualTo(Object expected)
void
void
void
isNoneOf(Object first, Object second, @Nullable Object[] rest)
void
isNotEqualTo(Object unexpected)
void
void
void
final void
void
final void
String

This method is deprecated.

Public methods

assertThat

public static IntentSubject assertThat(Intent intent)

categories

public final IterableSubject categories()

extras

public final BundleSubject extras()

filtersEquallyTo

public final void filtersEquallyTo(Intent intent)

hasAction

public final void hasAction(String action)

hasComponent

public final void hasComponent(ComponentName component)

hasComponent

public final void hasComponent(String packageName, String className)

hasComponentClass

public final void hasComponentClass(String className)

hasComponentClass

public final void hasComponentClass(Class<Object> componentClass)

hasComponentPackage

public final void hasComponentPackage(String packageName)

hasData

public final void hasData(Uri uri)

hasFlags

public final void hasFlags(int flag)

Assert that the intent has the given flag set.

hasNoAction

public final void hasNoAction()

hasPackage

public final void hasPackage(String packageName)

hasType

public final void hasType(String type)

intents

public static Subject.Factory<IntentSubjectIntentintents()