BundleSubject

public final class BundleSubject
extends Subject

java.lang.Object
   ↳ com.google.common.truth.Subject
     ↳ androidx.test.ext.truth.os.BundleSubject


Subject for making assertions about Bundles.

Summary

Public methods

static BundleSubject assertThat(Bundle bundle)
BooleanSubject bool(String key)
static Factory<BundleSubjectBundle> bundles()
void containsKey(String key)
void doesNotContainKey(String key)
void hasSize(int size)
IntegerSubject integer(String key)
void isEmpty()
void isNotEmpty()
LongSubject longInt(String key)
<T extends Parcelable> ParcelableSubject<T> parcelable(String key)
IterableSubject parcelableArrayList(String key)
<T extends Parcelable, SubjectT extends Subject> SubjectT parcelableAsType(String key, Factory<SubjectT, T> subjectFactory)
StringSubject string(String key)
IterableSubject stringArrayList(String key)

Inherited methods

Public methods

assertThat

public static BundleSubject assertThat (Bundle bundle)

Parameters
bundle Bundle

Returns
BundleSubject

bool

public BooleanSubject bool (String key)

Parameters
key String

Returns
BooleanSubject

bundles

public static Factory<BundleSubjectBundle> bundles ()

Returns
Factory<BundleSubjectBundle>

containsKey

public void containsKey (String key)

Parameters
key String

doesNotContainKey

public void doesNotContainKey (String key)

Parameters
key String

hasSize

public void hasSize (int size)

Parameters
size int

integer

public IntegerSubject integer (String key)

Parameters
key String

Returns
IntegerSubject

isEmpty

public void isEmpty ()

isNotEmpty

public void isNotEmpty ()

longInt

public LongSubject longInt (String key)

Parameters
key String

Returns
LongSubject

parcelable

public ParcelableSubject<T> parcelable (String key)

Parameters
key String

Returns
ParcelableSubject<T>

parcelableArrayList

public IterableSubject parcelableArrayList (String key)

Parameters
key String

Returns
IterableSubject

parcelableAsType

public SubjectT parcelableAsType (String key, 
                Factory<SubjectT, T> subjectFactory)

Parameters
key String

subjectFactory Factory

Returns
SubjectT

string

public StringSubject string (String key)

Parameters
key String

Returns
StringSubject

stringArrayList

public IterableSubject stringArrayList (String key)

Parameters
key String

Returns
IterableSubject