BundleSubject


public final class BundleSubject extends Subject


Subject for making assertions about Bundles.

To assert about android.os.PersistableBundles, use PersistableBundleSubject.

Summary

Public methods

static BundleSubject
static Subject.Factory<BundleSubject, Bundle>
PrimitiveByteArraySubject
IterableSubject
ParcelableSubject<T>
<T extends Parcelable> parcelable(String key)
IterableSubject
SubjectT
<T extends Parcelable, SubjectT extends Subject> parcelableAsType(
    String key,
    Subject.Factory<SubjectT, T> subjectFactory
)
Subject

Returns a truth subject for the value associated with the given key.

IterableSubject

Inherited methods

From com.google.common.truth.Subject
String
final boolean

This method is deprecated.

final void
final void
failWithoutActual(Fact first, Fact[] rest)
final int

This method is deprecated.

final StandardSubjectBuilder
void
isAnyOf(Object first, Object second, Object[] rest)
void
isEqualTo(Object expected)
void
isIn(Iterable<@NonNull ?> iterable)
void
void
isNoneOf(Object first, Object second, Object[] rest)
void
isNotEqualTo(Object unexpected)
void
isNotIn(Iterable<@NonNull ?> iterable)
void
void
final void
void
final void
String

Public methods

assertThat

public static BundleSubject assertThat(Bundle bundle)

bundles

public static Subject.Factory<BundleSubject, Bundle> bundles()

byteArray

public PrimitiveByteArraySubject byteArray(String key)

integerArrayList

public IterableSubject integerArrayList(String key)

parcelable

public ParcelableSubject<T> <T extends Parcelable> parcelable(String key)

parcelableArrayList

public IterableSubject parcelableArrayList(String key)

parcelableAsType

public SubjectT <T extends Parcelable, SubjectT extends Subject> parcelableAsType(
    String key,
    Subject.Factory<SubjectT, T> subjectFactory
)

serializable

public Subject serializable(String key)

Returns a truth subject for the value associated with the given key.

stringArrayList

public IterableSubject stringArrayList(String key)