BundleSubject


class BundleSubject : Subject


Subject for making assertions about Bundles.

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

Summary

Public functions

java-static BundleSubject!
assertThat(bundle: Bundle!)
java-static Subject.Factory<BundleSubject!, Bundle!>!
PrimitiveByteArraySubject!
IterableSubject!
ParcelableSubject<T!>!
<T : Parcelable?> parcelable(key: String!)
IterableSubject!
SubjectT!
<T : Parcelable?, SubjectT : Subject?> parcelableAsType(
    key: String!,
    subjectFactory: Subject.Factory<SubjectT!, T!>!
)
Subject!

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

IterableSubject!

Inherited functions

From com.google.common.truth.Subject
String!
Boolean
equals(o: Any!)

This function is deprecated.

Unit
failWithActual(key: String!, value: Any!)
Unit
failWithoutActual(first: Fact!, rest: Array<Fact!>!)
Int

This function is deprecated.

StandardSubjectBuilder!
Unit
isAnyOf(first: Any!, second: Any!, rest: Array<Any!>!)
Unit
isEqualTo(expected: Any!)
Unit
isIn(iterable: (Mutable)Iterable<*>!)
Unit
isInstanceOf(clazz: Class<*>!)
Unit
isNoneOf(first: Any!, second: Any!, rest: Array<Any!>!)
Unit
isNotEqualTo(unexpected: Any!)
Unit
isNotIn(iterable: (Mutable)Iterable<*>!)
Unit
isNotInstanceOf(clazz: Class<*>!)
Unit
Unit
isNotSameInstanceAs(unexpected: Any!)
Unit
Unit
isSameInstanceAs(expected: Any!)
String!

Public functions

assertThat

java-static fun assertThat(bundle: Bundle!): BundleSubject!

bundles

java-static fun bundles(): Subject.Factory<BundleSubject!, Bundle!>!

byteArray

fun byteArray(key: String!): PrimitiveByteArraySubject!

integerArrayList

fun integerArrayList(key: String!): IterableSubject!

parcelable

fun <T : Parcelable?> parcelable(key: String!): ParcelableSubject<T!>!

parcelableArrayList

fun parcelableArrayList(key: String!): IterableSubject!

parcelableAsType

fun <T : Parcelable?, SubjectT : Subject?> parcelableAsType(
    key: String!,
    subjectFactory: Subject.Factory<SubjectT!, T!>!
): SubjectT!

serializable

fun serializable(key: String!): Subject!

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

stringArrayList

fun stringArrayList(key: String!): IterableSubject!