{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

IntentSubject

class IntentSubject


Subject for making assertions about Intents.

Summary

Public functions

IntentSubject
assertThat(intent: Intent)
IterableSubject
BundleSubject
Unit
filtersEquallyTo(intent: Intent)
Unit
hasAction(action: String)
Unit
hasComponent(packageName: String, className: String)
Unit
hasComponent(component: ComponentName)
Unit
hasComponentClass(componentClass: Class<Any>)
Unit
Unit
Unit
hasData(uri: Uri)
Unit
hasFlags(flag: Int)

Assert that the intent has the given flag set.

Unit
Unit
hasPackage(packageName: String)
Unit
hasType(type: String)
Factory<IntentSubject, Intent>

Public functions

assertThat

fun assertThat(intent: Intent): IntentSubject

categories

fun categories(): IterableSubject

extras

fun extras(): BundleSubject

filtersEquallyTo

fun filtersEquallyTo(intent: Intent): Unit

hasAction

fun hasAction(action: String): Unit

hasComponent

fun hasComponent(packageName: String, className: String): Unit

hasComponent

fun hasComponent(component: ComponentName): Unit

hasComponentClass

fun hasComponentClass(componentClass: Class<Any>): Unit
See also
hasComponentClass

#hasComponentClass(String)

hasComponentClass

fun hasComponentClass(className: String): Unit
See also
hasComponentClass

#hasComponentClass(Class)

hasComponentPackage

fun hasComponentPackage(packageName: String): Unit

hasData

fun hasData(uri: Uri): Unit

hasFlags

fun hasFlags(flag: Int): Unit

Assert that the intent has the given flag set.

hasNoAction

fun hasNoAction(): Unit

hasPackage

fun hasPackage(packageName: String): Unit

hasType

fun hasType(type: String): Unit

intents

fun intents(): Factory<IntentSubject, Intent>