IntentSubject

public final class IntentSubject
extends Subject<IntentSubjectIntent>

java.lang.Object
   ↳ com.google.common.truth.Subject<androidx.test.ext.truth.content.IntentSubjectandroid.content.Intent>
     ↳ androidx.test.ext.truth.content.IntentSubject


Subject for making assertions about Intents.

Summary

Public methods

static IntentSubject assertThat(Intent intent)
IterableSubject categories()
BundleSubject extras()
void hasAction(String action)
void hasComponent(String packageName, String className)
void hasComponentClass(String className)
void hasComponentClass(Class<?> componentClass)
void hasComponentPackage(String packageName)
void hasData(Uri uri)
void hasFlags(int flag)

Assert that the intent has the given flag set.

void hasNoAction()
void hasPackage(String packageName)
void hasType(String type)
static Factory<IntentSubjectIntent> intents()

Inherited methods

From class com.google.common.truth.Subject
From class java.lang.Object

Public methods

assertThat

IntentSubject assertThat (Intent intent)

Parameters
intent Intent

Returns
IntentSubject

categories

IterableSubject categories ()

Returns
IterableSubject

extras

BundleSubject extras ()

Returns
BundleSubject

hasAction

void hasAction (String action)

Parameters
action String

hasComponent

void hasComponent (String packageName, 
                String className)

Parameters
packageName String

className String

hasComponentClass

void hasComponentClass (String className)

Parameters
className String

hasComponentClass

void hasComponentClass (Class<?> componentClass)

Parameters
componentClass Class

hasComponentPackage

void hasComponentPackage (String packageName)

Parameters
packageName String

hasData

void hasData (Uri uri)

Parameters
uri Uri

hasFlags

void hasFlags (int flag)

Assert that the intent has the given flag set.

Parameters
flag int

hasNoAction

void hasNoAction ()

hasPackage

void hasPackage (String packageName)

Parameters
packageName String

hasType

void hasType (String type)

Parameters
type String

intents

Factory<IntentSubjectIntent> intents ()

Returns
Factory<IntentSubjectIntent>