{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

SparseBooleanArraySubject

class SparseBooleanArraySubject


Subject for making assertions about SparseBooleanArrays.

Summary

Public functions

SparseBooleanArraySubject
assertThat(actual: SparseBooleanArray)

Begins an assertion on a SparseBooleanArray

Unit

Assert that a SparseBooleanArray contains the given key

Unit

Assert that a SparseBooleanArray doesn't contain the given key

AssertionError
expectFailure(
    callback: SimpleSubjectBuilderCallback<SparseBooleanArraySubject, SparseBooleanArray>
)

Begins an assertion on a SparseBooleanArray where a predicate is expected to fail

Unit

Assert that a SparseBooleanArray for the given key returns the value false

Unit
hasSize(size: Int)

Assert that a SparseBooleanArray has size

Unit

Assert that a SparseBooleanArray for the given key returns the value true

Unit

Assert that a SparseBooleanArray is empty

Unit

Assert that a SparseBooleanArray is not empty

Public functions

assertThat

fun assertThat(actual: SparseBooleanArray): SparseBooleanArraySubject

Begins an assertion on a SparseBooleanArray

containsKey

fun containsKey(key: Int): Unit

Assert that a SparseBooleanArray contains the given key

doesNotContainKey

fun doesNotContainKey(key: Int): Unit

Assert that a SparseBooleanArray doesn't contain the given key

expectFailure

fun expectFailure(
    callback: SimpleSubjectBuilderCallback<SparseBooleanArraySubject, SparseBooleanArray>
): AssertionError

Begins an assertion on a SparseBooleanArray where a predicate is expected to fail

hasFalseValueAt

fun hasFalseValueAt(key: Int): Unit

Assert that a SparseBooleanArray for the given key returns the value false

hasSize

fun hasSize(size: Int): Unit

Assert that a SparseBooleanArray has size

hasTrueValueAt

fun hasTrueValueAt(key: Int): Unit

Assert that a SparseBooleanArray for the given key returns the value true

isEmpty

fun isEmpty(): Unit

Assert that a SparseBooleanArray is empty

isNotEmpty

fun isNotEmpty(): Unit

Assert that a SparseBooleanArray is not empty