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!)
BooleanSubject!
bool(key: String!)
java-static Subject.Factory<BundleSubject!, Bundle!>!
PrimitiveByteArraySubject!
Unit
Unit
DoubleSubject
Unit
hasSize(size: Int)
IntegerSubject!
integer(key: String!)
Unit
Unit
LongSubject!
longInt(key: String!)
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.

StringSubject!
string(key: String!)
ObjectArraySubject<String!>
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<Any!>?)
Unit
isInstanceOf(clazz: Class<Any!>!)
Unit
isNoneOf(first: Any?, second: Any?, rest: Array<Any?>?)
Unit
isNotEqualTo(unexpected: Any?)
Unit
isNotIn(iterable: (Mutable)Iterable<Any!>?)
Unit
Unit
Unit
isNotSameInstanceAs(unexpected: Any?)
Unit
Unit
isSameInstanceAs(expected: Any?)
String!

This function is deprecated.

Public functions

assertThat

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

bool

fun bool(key: String!): BooleanSubject!

bundles

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

byteArray

fun byteArray(key: String!): PrimitiveByteArraySubject!

containsKey

fun containsKey(key: String!): Unit

doesNotContainKey

fun doesNotContainKey(key: String!): Unit

doubleFloat

fun doubleFloat(key: String): DoubleSubject

hasSize

fun hasSize(size: Int): Unit

integer

fun integer(key: String!): IntegerSubject!

isEmpty

fun isEmpty(): Unit

isNotEmpty

fun isNotEmpty(): Unit

longInt

fun longInt(key: String!): LongSubject!

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.

string

fun string(key: String!): StringSubject!

stringArray

fun stringArray(key: String): ObjectArraySubject<String!>

stringArrayList

fun stringArrayList(key: String!): IterableSubject!