ParcelableSubject
Artifact: androidx.test.ext:truth
public final class ParcelableSubject<T extends Parcelable> extends Subject
Testing subject for Parcelables.
Summary
Public methods |
|
|---|---|
static ParcelableSubject<T> |
<T extends Parcelable> assertThat(T parcelable) |
void |
marshallsEquallyTo(Parcelable other)Asserts that the subject serializes to the same bytes as some other one. |
static Subject.Factory<ParcelableSubject<T>, T> |
<T extends Parcelable> parcelables() |
void |
recreatesEqual(Parcelable.Creator<T> creator)Asserts that the subject is equal to itself after it goes through marshall/unmarshall cycle. |
Inherited methods |
||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public methods
marshallsEquallyTo
public void marshallsEquallyTo(Parcelable other)
Asserts that the subject serializes to the same bytes as some other one.
parcelables
public static Subject.Factory<ParcelableSubject<T>, T> <T extends Parcelable> parcelables()
recreatesEqual
public void recreatesEqual(Parcelable.Creator<T> creator)
Asserts that the subject is equal to itself after it goes through marshall/unmarshall cycle.