{% 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 constructors

Public functions

java-static ParcelableSubject<T!>!
<T : Parcelable?> assertThat(parcelable: T!)
Unit
marshallsEquallyTo(other: Parcelable!)

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

java-static 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 constructors

ParcelableSubject

ParcelableSubject()

Public functions

assertThat

java-static 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

java-static 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.