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

Class Overview

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()
[Expand]
Inherited Methods
From class com.google.common.truth.Subject
From class java.lang.Object

Public Methods

public static IntentSubject assertThat (Intent intent)

Parameters
intent Intent
Returns
IntentSubject

public IterableSubject categories ()

Returns
IterableSubject

public BundleSubject extras ()

Returns
BundleSubject

public void filtersEquallyTo (Intent intent)

Parameters
intent Intent

public void hasAction (String action)

Parameters
action String

public void hasComponent (String packageName, String className)

Parameters
packageName String
className String

public void hasComponent (ComponentName component)

Parameters
component ComponentName

public void hasComponentClass (String className)

Parameters
className String

public void hasComponentClass (Class<?> componentClass)

Parameters
componentClass Class

public void hasComponentPackage (String packageName)

Parameters
packageName String

public void hasData (Uri uri)

Parameters
uri Uri

public void hasFlags (int flag)

Assert that the intent has the given flag set.

Parameters
flag int

public void hasNoAction ()

public void hasPackage (String packageName)

Parameters
packageName String

public void hasType (String type)

Parameters
type String

public static Factory<IntentSubjectIntent> intents ()

Returns
Factory<IntentSubjectIntent>