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

ParcelableSubject

public final class ParcelableSubject<T extends Parcelable>


Testing subject for Parcelables.

Summary

Public methods

static @NonNull ParcelableSubject<@NonNull T>
<T extends Parcelable> assertThat(@NonNull T parcelable)
@NonNull void
marshallsEquallyTo(@NonNull Parcelable other)

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

static @NonNull Factory<ParcelableSubject<T>, T>
<T extends Parcelable> parcelables()
@NonNull void
recreatesEqual(@NonNull Creator<T> creator)

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

Public methods

assertThat

@NonNull
public static ParcelableSubject<@NonNull T> <T extends Parcelable> assertThat(@NonNull T parcelable)

marshallsEquallyTo

@NonNull
public void marshallsEquallyTo(@NonNull Parcelable other)

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

parcelables

@NonNull
public static Factory<ParcelableSubject<T>, T> <T extends Parcelable> parcelables()

recreatesEqual

@NonNull
public void recreatesEqual(@NonNull Creator<T> creator)

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