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

ParcelableSubject

class ParcelableSubject<T : Parcelable?>


Testing subject for Parcelables.

Summary

Public functions

ParcelableSubject<T>
<T : Parcelable?> assertThat(parcelable: T)
Unit
marshallsEquallyTo(other: Parcelable)

Asserts that the subject serializes to the same bytes as some other one.

Factory<ParcelableSubject<T>, T>
<T : Parcelable?> parcelables()
Unit
recreatesEqual(creator: Creator<T>)

Asserts that the subject is equal to itself after it goes through marshall/unmarshall cycle.

Public functions

assertThat

fun <T : Parcelable?> assertThat(parcelable: T): ParcelableSubject<T>

marshallsEquallyTo

fun marshallsEquallyTo(other: Parcelable): Unit

Asserts that the subject serializes to the same bytes as some other one.

parcelables

fun <T : Parcelable?> parcelables(): Factory<ParcelableSubject<T>, T>

recreatesEqual

fun recreatesEqual(creator: Creator<T>): Unit

Asserts that the subject is equal to itself after it goes through marshall/unmarshall cycle.