IntentSubject

public final class IntentSubject
extends Subject

java.lang.Object
   ↳ com.google.common.truth.Subject
     ↳ 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 filtersEquallyTo(Intent intent)
void hasAction(String action)
void hasComponent(String packageName, String className)
void hasComponent(ComponentName component)
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

Public methods

assertThat

public static IntentSubject assertThat (Intent intent)

Parameters
intent Intent

Returns
IntentSubject

categories

public IterableSubject categories ()

Returns
IterableSubject

extras

public BundleSubject extras ()

Returns
BundleSubject

filtersEquallyTo

public void filtersEquallyTo (Intent intent)

Parameters
intent Intent

hasAction

public void hasAction (String action)

Parameters
action String

hasComponent

public void hasComponent (String packageName, 
                String className)

Parameters
packageName String

className String

hasComponent

public void hasComponent (ComponentName component)

Parameters
component ComponentName

hasComponentClass

public void hasComponentClass (String className)

Parameters
className String

hasComponentClass

public void hasComponentClass (Class<?> componentClass)

Parameters
componentClass Class

hasComponentPackage

public void hasComponentPackage (String packageName)

Parameters
packageName String

hasData

public void hasData (Uri uri)

Parameters
uri Uri

hasFlags

public void hasFlags (int flag)

Assert that the intent has the given flag set.

Parameters
flag int

hasNoAction

public void hasNoAction ()

hasPackage

public void hasPackage (String packageName)

Parameters
packageName String

hasType

public void hasType (String type)

Parameters
type String

intents

public static Factory<IntentSubjectIntent> intents ()

Returns
Factory<IntentSubjectIntent>